diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-20 12:17:18 +0200 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-20 12:32:06 +0200 |
commit | 495bc391e140cc2bb462c81fa90410a0fe8f6a4c (patch) | |
tree | 5c141e2fcaefd508acf407267bb23807d46710a9 /web-ui/test/spec/page | |
parent | b74a39f27c292cc95345b7ab266bb3db2f812a66 (diff) |
massive update of bower and npm libs - includes flight, jasmine and a bunch of
stuff. If things get weird when developing, remove you bower_components
and your node_modules and install it again
Diffstat (limited to 'web-ui/test/spec/page')
-rw-r--r-- | web-ui/test/spec/page/logout.spec.js | 8 | ||||
-rw-r--r-- | web-ui/test/spec/page/pane_contract_expand.spec.js | 4 | ||||
-rw-r--r-- | web-ui/test/spec/page/router.spec.js | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/web-ui/test/spec/page/logout.spec.js b/web-ui/test/spec/page/logout.spec.js index fa1b2634..9285013a 100644 --- a/web-ui/test/spec/page/logout.spec.js +++ b/web-ui/test/spec/page/logout.spec.js @@ -11,9 +11,9 @@ describeComponent('page/logout', function () { }); it('should provide logout link if logout is enabled', function () { - spyOn(features, 'isLogoutEnabled').andReturn(true); + spyOn(features, 'isLogoutEnabled').and.returnValue(true); - setupComponent('<div id="logout"></div>', {}); + this.setupComponent('<div id="logout"></div>', {}); var logout_link = this.component.$node.find('a')[0]; expect(logout_link).toExist(); @@ -21,9 +21,9 @@ describeComponent('page/logout', function () { }); it('should not provide logout link if disabled', function() { - spyOn(features, 'isLogoutEnabled').andReturn(false); + spyOn(features, 'isLogoutEnabled').and.returnValue(false); - setupComponent('<div id="logout"></div>', {}); + this.setupComponent('<div id="logout"></div>', {}); var logout_link = this.component.$node.find('a')[0]; expect(logout_link).not.toExist(); diff --git a/web-ui/test/spec/page/pane_contract_expand.spec.js b/web-ui/test/spec/page/pane_contract_expand.spec.js index 9a09edb2..61d786eb 100644 --- a/web-ui/test/spec/page/pane_contract_expand.spec.js +++ b/web-ui/test/spec/page/pane_contract_expand.spec.js @@ -23,7 +23,7 @@ describeComponent('page/pane_contract_expand', function () { describe('after initialization', function () { beforeEach(function () { - setupComponent(document); + this.setupComponent(document); }); it('contracts middle pane and expands right pane on mail open', function () { @@ -57,7 +57,7 @@ describeComponent('page/pane_contract_expand', function () { describe('on initialization', function () { it('expands middle pane and contracts right pane', function () { - setupComponent(document); + this.setupComponent(document); expect($('#middle-pane-container').attr('class')).toEqual(this.component.attr.MIDDLE_PANE_EXPAND_CLASSES); expect($('#right-pane').attr('class')).toEqual(this.component.attr.RIGHT_PANE_CONTRACT_CLASSES); diff --git a/web-ui/test/spec/page/router.spec.js b/web-ui/test/spec/page/router.spec.js index 6fdd404a..7340ecad 100644 --- a/web-ui/test/spec/page/router.spec.js +++ b/web-ui/test/spec/page/router.spec.js @@ -8,7 +8,7 @@ describeComponent('page/router', function () { describe('on router:pushState coming from a tag selection', function () { beforeEach(function () { fakeHistory = jasmine.createSpyObj('history', ['pushState']); - setupComponent({history: fakeHistory}); + this.setupComponent({history: fakeHistory}); }); it('pushes the state with the tag and the url', function () { @@ -41,7 +41,7 @@ describeComponent('page/router', function () { it('when popping a state with no tag should select tag from url', function () { var urlParams = require('page/router/url_params'); - spyOn(urlParams, 'getTag').andReturn('tag'); + spyOn(urlParams, 'getTag').and.returnValue('tag'); var selectTagEvent = spyOnEvent(document, Pixelated.events.ui.tag.select); @@ -52,7 +52,7 @@ describeComponent('page/router', function () { it('when popping a state triggers the displayNoMessage pane if required', function () { var urlParams = require('page/router/url_params'); - spyOn(urlParams, 'getTag').andReturn('tag'); + spyOn(urlParams, 'getTag').and.returnValue('tag'); var displayNoMessageEvent = spyOnEvent(document, Pixelated.events.dispatchers.rightPane.openNoMessageSelectedWithoutPushState); |