GUI -- Topology View all, packet, and optical layer radio buttons are now part of the topology view toolbar, instead of being in the masthead. Keystroke 'N' for cycle node layers added. Button glyph added. Fixed previously unseen broken unit tests for table.js.

Change-Id: I6e53bdc6cacbf41b990abd07d30fc99ef4c3b8c0
diff --git a/web/gui/src/main/webapp/tests/app/fw/widget/table-spec.js b/web/gui/src/main/webapp/tests/app/fw/widget/table-spec.js
index 908ea16..29927cd 100644
--- a/web/gui/src/main/webapp/tests/app/fw/widget/table-spec.js
+++ b/web/gui/src/main/webapp/tests/app/fw/widget/table-spec.js
@@ -19,11 +19,12 @@
  */
 describe('factory: fw/widget/table.js', function () {
     var $log, $compile, $rootScope,
-        fs, is,
+        fs, mast, is,
         scope, compiled,
-        table, thead, tbody,
+        table, thead, tbody, mockHeader,
+        mockh2Height = '10px',
         tableIconTdSize = 100,
-        bottomMargin = 200,
+        pdgTop = 101,
         numTestElems = 4;
 
     var onosFixedHeaderTags = '<table ' +
@@ -73,7 +74,7 @@
                                 '</tbody>' +
                                 '</table>';
 
-    beforeEach(module('onosWidget', 'onosUtil', 'onosSvg'));
+    beforeEach(module('onosWidget', 'onosUtil', 'onosMast', 'onosSvg'));
 
     var mockWindow = {
         innerWidth: 400,
@@ -92,11 +93,12 @@
     });
 
     beforeEach(inject(function (_$log_, _$compile_, _$rootScope_,
-                                FnService, IconService) {
+                                FnService, MastService, IconService) {
         $log = _$log_;
         $compile = _$compile_;
         $rootScope = _$rootScope_;
         fs = FnService;
+        mast = MastService;
         is = IconService;
     }));
 
@@ -104,10 +106,18 @@
         scope = $rootScope.$new();
     });
 
+    beforeEach(function () {
+        mockHeader = d3.select('body')
+            .append('h2')
+            .style('height', mockh2Height)
+            .html('Some Header');
+    });
+
     afterEach(function () {
         table = null;
         thead = null;
         tbody = null;
+        mockHeader.remove();
     });
 
     function compileTable() {
@@ -127,11 +137,11 @@
     }
 
     function verifyCssDisplay() {
-        var winHeight = fs.windowSize().height;
+        var tableHeight = fs.windowSize(pdgTop).height;
 
         expect(thead.css('display')).toBe('block');
         expect(tbody.css('display')).toBe('block');
-        expect(tbody.css('height')).toBe((winHeight - bottomMargin) + 'px');
+        expect(tbody.css('height')).toBe(tableHeight + 'px');
         expect(tbody.css('overflow')).toBe('auto');
     }