From 495bc391e140cc2bb462c81fa90410a0fe8f6a4c Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Mon, 20 Oct 2014 12:17:18 +0200 Subject: 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 --- web-ui/test/spec/page/logout.spec.js | 8 ++++---- web-ui/test/spec/page/pane_contract_expand.spec.js | 4 ++-- web-ui/test/spec/page/router.spec.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'web-ui/test/spec/page') 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('
', {}); + this.setupComponent('
', {}); 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('
', {}); + this.setupComponent('
', {}); 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); -- cgit v1.2.3