GUI -- Icon service work:
- Changed color of check and xmark icons for dark and light themes.
- Only appends glyphs that don't have a "-" as the name.
- Wrote unit tests for new icons.
Change-Id: Ia21fa33673e3adcfd8717f899d226b0d24dfcc51
diff --git a/web/gui/src/main/webapp/tests/app/fw/svg/icon-spec.js b/web/gui/src/main/webapp/tests/app/fw/svg/icon-spec.js
index bb203a7..c887c79 100644
--- a/web/gui/src/main/webapp/tests/app/fw/svg/icon-spec.js
+++ b/web/gui/src/main/webapp/tests/app/fw/svg/icon-spec.js
@@ -65,13 +65,14 @@
checkElemSize(rect, gsz);
expect(rect.attr('rx')).toEqual('5');
- var use = g.select('use');
- expect(use.classed('glyph')).toBeTruthy();
- expect(use.attr('xlink:href')).toEqual(useHref);
- checkElemSize(use, gsz);
+ if (useHref) {
+ var use = g.select('use');
+ expect(use.classed('glyph')).toBeTruthy();
+ expect(use.attr('xlink:href')).toEqual(useHref);
+ checkElemSize(use, gsz);
+ }
}
-
it('should load an icon into a div', function () {
expect(d3Elem.html()).toEqual('');
is.loadIcon(d3Elem, 'deviceOnline');
@@ -84,4 +85,22 @@
verifyIconStructure('deviceOffline', '#xMark', '32');
});
+ it('should verify triangleUp icon', function () {
+ expect(d3Elem.html()).toEqual('');
+ is.loadIcon(d3Elem, 'tableColSortAsc', 10);
+ verifyIconStructure('tableColSortAsc', '#triangleUp', '10');
+ });
+
+ it('should verify triangleDown icon', function () {
+ expect(d3Elem.html()).toEqual('');
+ is.loadIcon(d3Elem, 'tableColSortDesc', 10);
+ verifyIconStructure('tableColSortDesc', '#triangleDown', '10');
+ });
+
+ it('should verify no icon is displayed', function () {
+ expect(d3Elem.html()).toEqual('');
+ is.loadIcon(d3Elem, 'tableColSortNone', 10);
+ verifyIconStructure('tableColSortNone', null, '10');
+ });
+
});