diff --git a/test/devtools-spec.js b/test/devtools-spec.js index 7264caa..8d3087f 100644 --- a/test/devtools-spec.js +++ b/test/devtools-spec.js @@ -1,18 +1,20 @@ describe('DevTools Extension setup', function (){ - var app; + var app, storage, panel; beforeAll(function(){ - app = window.app; + app = window.app; + storage = chrome.storage.sync; + panel = chrome.devtools.panels; }); it('should creates Author Settings panel', function(){ expect(app).toBeDefined(); - expect(chrome.devtools).toBeDefined(); + expect(panel).toBeDefined(); }); it('should load theme CSS file from storage', function(){ expect(app).toBeDefined(); - expect(chrome.storage).toBeDefined(); + expect(storage).toBeDefined(); }); }); diff --git a/test/panel-spec.js b/test/panel-spec.js index dc552ab..00086d6 100644 --- a/test/panel-spec.js +++ b/test/panel-spec.js @@ -2,7 +2,10 @@ describe('DevTools Author Settings panel', function (){ var panel; beforeAll(function(){ - panel = window.panel; + panel = window.panel; + ga = window.ga; + $ = document.querySelectorAll.bind(document); + storage = chrome.storage.sync; }); it('should get theme.json via AJAX', function(){ @@ -11,32 +14,32 @@ describe('DevTools Author Settings panel', function (){ it('should set devtools-theme to storage', function(){ expect(app).toBeDefined(); - expect(chrome.storage).toBeDefined(); + expect(storage).toBeDefined(); }); it('should get devtools-theme from storage', function(){ expect(app).toBeDefined(); - expect(chrome.storage).toBeDefined(); + expect(storage).toBeDefined(); }); it('should set devtools-fontFamily to storage', function(){ expect(app).toBeDefined(); - expect(chrome.storage).toBeDefined(); + expect(storage).toBeDefined(); }); it('should get devtools-fontFamily from storage', function(){ expect(app).toBeDefined(); - expect(chrome.storage).toBeDefined(); + expect(storage).toBeDefined(); }); it('should set devtools-fontSize to storage', function(){ expect(app).toBeDefined(); - expect(chrome.storage).toBeDefined(); + expect(storage).toBeDefined(); }); it('should get devtools-fontSize from storage', function(){ expect(app).toBeDefined(); - expect(chrome.storage).toBeDefined(); + expect(storage).toBeDefined(); }); });