Skip to content

Commit

Permalink
Updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
micjamking committed Feb 21, 2016
1 parent c787425 commit d5cbd57
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
10 changes: 6 additions & 4 deletions test/devtools-spec.js
Original file line number Diff line number Diff line change
@@ -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();
});

});
17 changes: 10 additions & 7 deletions test/panel-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand All @@ -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();
});

});

0 comments on commit d5cbd57

Please sign in to comment.