File tree 9 files changed +29
-23
lines changed
9 files changed +29
-23
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ describe('Login View', function() {
8
8
var page ;
9
9
10
10
var loadPage = function ( ) {
11
- browser . get ( '/login' ) ;
11
+ browser . get ( config . baseUrl + '/login' ) ;
12
12
page = require ( './login.po' ) ;
13
13
} ;
14
14
@@ -45,7 +45,7 @@ describe('Login View', function() {
45
45
46
46
var navbar = require ( '../../components/navbar/navbar.po' ) ;
47
47
48
- expect ( browser . getLocationAbsUrl ( ) ) . toBe ( config . baseUrl + '/' ) ;
48
+ expect ( browser . getCurrentUrl ( ) ) . toBe ( config . baseUrl + '/' ) ;
49
49
expect ( navbar . navbarAccountGreeting . getText ( ) ) . toBe ( 'Hello ' + testUser . name ) ;
50
50
} ) ;
51
51
@@ -55,7 +55,7 @@ describe('Login View', function() {
55
55
password : 'badPassword'
56
56
} ) ;
57
57
58
- expect ( browser . getLocationAbsUrl ( ) ) . toBe ( config . baseUrl + '/login' ) ;
58
+ expect ( browser . getCurrentUrl ( ) ) . toBe ( config . baseUrl + '/login' ) ;
59
59
60
60
var helpBlock = page . form . element ( by . css ( '.form-group.has-error .help-block.ng-binding' ) ) ;
61
61
expect ( helpBlock . getText ( ) ) . toBe ( 'This password is not correct.' ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ describe('Login View', function() {
8
8
var page ;
9
9
10
10
var loadPage = function ( ) {
11
- browser . get ( '/login' ) ;
11
+ browser . get ( config . baseUrl + '/login' ) ;
12
12
page = require ( './login.po' ) ;
13
13
} ;
14
14
@@ -50,7 +50,7 @@ describe('Login View', function() {
50
50
51
51
var navbar = require ( '../../components/navbar/navbar.po' ) ;
52
52
53
- < %= does ( "browser.getLocationAbsUrl ()" ) % > . eventually . equal ( config . baseUrl + '/' ) ;
53
+ < %= does ( "browser.getCurrentUrl ()" ) % > . eventually . equal ( config . baseUrl + '/' ) ;
54
54
< %= does ( "navbar.navbarAccountGreeting.getText()" ) % > . eventually . equal ( 'Hello ' + testUser . name ) ;
55
55
} ) ;
56
56
@@ -65,7 +65,7 @@ describe('Login View', function() {
65
65
password : 'badPassword'
66
66
} ) ;
67
67
68
- < %= does ( "browser.getLocationAbsUrl ()" ) % > . eventually . equal ( config . baseUrl + '/login' ) ;
68
+ < %= does ( "browser.getCurrentUrl ()" ) % > . eventually . equal ( config . baseUrl + '/login' ) ;
69
69
70
70
var helpBlock = page . form . element ( by . css ( '.form-group.has-error .help-block.ng-binding' ) ) ;
71
71
< %= does ( "helpBlock.getText()" ) % > . eventually . equal ( 'This password is not correct.' ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ var UserModel = require(config.serverConfig.root + '/server/sqldb').User;<% } %>
6
6
7
7
describe ( 'Logout View' , function ( ) {
8
8
var login = function ( user ) {
9
- browser . get ( '/login' ) ;
9
+ browser . get ( config . baseUrl + '/login' ) ;
10
10
require ( '../login/login.po' ) . login ( user ) ;
11
11
} ;
12
12
@@ -34,14 +34,14 @@ describe('Logout View', function() {
34
34
it ( 'should logout a user and redirecting to "/"' , function ( ) {
35
35
var navbar = require ( '../../components/navbar/navbar.po' ) ;
36
36
37
- expect ( browser . getLocationAbsUrl ( ) ) . toBe ( config . baseUrl + '/' ) ;
37
+ expect ( browser . getCurrentUrl ( ) ) . toBe ( config . baseUrl + '/' ) ;
38
38
expect ( navbar . navbarAccountGreeting . getText ( ) ) . toBe ( 'Hello ' + testUser . name ) ;
39
39
40
- browser . get ( '/logout' ) ;
40
+ browser . get ( config . baseUrl + '/logout' ) ;
41
41
42
42
navbar = require ( '../../components/navbar/navbar.po' ) ;
43
43
44
- expect ( browser . getLocationAbsUrl ( ) ) . toBe ( config . baseUrl + '/' ) ;
44
+ expect ( browser . getCurrentUrl ( ) ) . toBe ( config . baseUrl + '/' ) ;
45
45
expect ( navbar . navbarAccountGreeting . isDisplayed ( ) ) . toBe ( false ) ;
46
46
} ) ;
47
47
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ var UserModel = require(config.serverConfig.root + '/server/sqldb').User;<% } %>
6
6
7
7
describe ( 'Logout View' , function ( ) {
8
8
var login = function ( user ) {
9
- browser . get ( '/login' ) ;
9
+ browser . get ( config . baseUrl + '/login' ) ;
10
10
require ( '../login/login.po' ) . login ( user ) ;
11
11
} ;
12
12
@@ -39,14 +39,14 @@ describe('Logout View', function() {
39
39
it ( 'should logout a user and redirecting to "/"' , function ( ) {
40
40
var navbar = require ( '../../components/navbar/navbar.po' ) ;
41
41
42
- < %= does ( "browser.getLocationAbsUrl ()" ) % > . eventually . equal ( config . baseUrl + '/' ) ;
42
+ < %= does ( "browser.getCurrentUrl ()" ) % > . eventually . equal ( config . baseUrl + '/' ) ;
43
43
< %= does ( "navbar.navbarAccountGreeting.getText()" ) % > . eventually . equal ( 'Hello ' + testUser . name ) ;
44
44
45
- browser . get ( '/logout' ) ;
45
+ browser . get ( config . baseUrl + '/logout' ) ;
46
46
47
47
navbar = require ( '../../components/navbar/navbar.po' ) ;
48
48
49
- < %= does ( "browser.getLocationAbsUrl ()" ) % > . eventually . equal ( config . baseUrl + '/' ) ;
49
+ < %= does ( "browser.getCurrentUrl ()" ) % > . eventually . equal ( config . baseUrl + '/' ) ;
50
50
< %= does ( "navbar.navbarAccountGreeting.isDisplayed()" ) % > . eventually . equal ( false ) ;
51
51
} ) ;
52
52
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ describe('Signup View', function() {
8
8
var page ;
9
9
10
10
var loadPage = function ( ) {
11
- browser . get ( '/signup' ) ;
11
+ browser . manage ( ) . deleteAllCookies ( ) ;
12
+ browser . get ( config . baseUrl + '/signup' ) ;
12
13
page = require ( './signup.po' ) ;
13
14
} ;
14
15
@@ -45,14 +46,14 @@ describe('Signup View', function() {
45
46
46
47
var navbar = require ( '../../components/navbar/navbar.po' ) ;
47
48
48
- expect ( browser . getLocationAbsUrl ( ) ) . toBe ( config . baseUrl + '/' ) ;
49
+ expect ( browser . getCurrentUrl ( ) ) . toBe ( config . baseUrl + '/' ) ;
49
50
expect ( navbar . navbarAccountGreeting . getText ( ) ) . toBe ( 'Hello ' + testUser . name ) ;
50
51
} ) ;
51
52
52
53
it ( 'should indicate signup failures' , function ( ) {
53
54
page . signup ( testUser ) ;
54
55
55
- expect ( browser . getLocationAbsUrl ( ) ) . toBe ( config . baseUrl + '/signup' ) ;
56
+ expect ( browser . getCurrentUrl ( ) ) . toBe ( config . baseUrl + '/signup' ) ;
56
57
expect ( page . form . email . getAttribute ( 'class' ) ) . toContain ( 'ng-invalid-mongoose' ) ;
57
58
58
59
var helpBlock = page . form . element ( by . css ( '.form-group.has-error .help-block.ng-binding' ) ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ describe('Signup View', function() {
8
8
var page ;
9
9
10
10
var loadPage = function ( ) {
11
- browser . get ( '/signup' ) ;
11
+ browser . manage ( ) . deleteAllCookies ( )
12
+ browser . get ( config . baseUrl + '/signup' ) ;
12
13
page = require ( './signup.po' ) ;
13
14
} ;
14
15
@@ -50,7 +51,7 @@ describe('Signup View', function() {
50
51
51
52
var navbar = require ( '../../components/navbar/navbar.po' ) ;
52
53
53
- < %= does ( "browser.getLocationAbsUrl ()" ) % > . eventually . equal ( config . baseUrl + '/' ) ;
54
+ < %= does ( "browser.getCurrentUrl ()" ) % > . eventually . equal ( config . baseUrl + '/' ) ;
54
55
< %= does ( "navbar.navbarAccountGreeting.getText()" ) % > . eventually . equal ( 'Hello ' + testUser . name ) ;
55
56
} ) ;
56
57
@@ -62,7 +63,7 @@ describe('Signup View', function() {
62
63
it ( 'should indicate signup failures' , function ( ) {
63
64
page . signup ( testUser ) ;
64
65
65
- < %= does ( "browser.getLocationAbsUrl ()" ) % > . eventually . equal ( config . baseUrl + '/signup' ) ;
66
+ < %= does ( "browser.getCurrentUrl ()" ) % > . eventually . equal ( config . baseUrl + '/signup' ) ;
66
67
< %= does ( "page.form.email.getAttribute('class')" ) % > . eventually . contain ( 'ng-invalid-mongoose' ) ;
67
68
68
69
var helpBlock = page . form . element ( by . css ( '.form-group.has-error .help-block.ng-binding' ) ) ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ var NavbarComponent = function() {
10
10
this . navbarHeader = this . navbar . element ( by . css ( '.navbar-header' ) ) ;
11
11
this . navbarNav = this . navbar . element ( by . css ( '#navbar-main .nav.navbar-nav:not(.navbar-right)' ) ) ; < % if ( filters . auth ) { % >
12
12
this . navbarAccount = this . navbar . element ( by . css ( '#navbar-main .nav.navbar-nav.navbar-right' ) ) ;
13
- this . navbarAccountGreeting = this . navbarAccount . element ( by . binding ( 'Hello {{ getCurrentUser().name }} ' ) ) ; < % } % >
13
+ this . navbarAccountGreeting = this . navbarAccount . element ( by . binding ( 'getCurrentUser().name' ) ) ; < % } % >
14
14
} ;
15
15
16
16
module . exports = new NavbarComponent ( ) ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
+ var config = browser . params ;
4
+
3
5
describe ( 'Main View' , function ( ) {
4
6
var page ;
5
7
6
8
beforeEach ( function ( ) {
7
- browser . get ( '/' ) ;
9
+ browser . get ( config . baseUrl + '/' ) ;
8
10
page = require ( './main.po' ) ;
9
11
} ) ;
10
12
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
+ var config = browser . params ;
4
+
3
5
describe ( 'Main View' , function ( ) {
4
6
var page ;
5
7
6
8
beforeEach ( function ( ) {
7
- browser . get ( '/' ) ;
9
+ browser . get ( config . baseUrl + '/' ) ;
8
10
page = require ( './main.po' ) ;
9
11
} ) ;
10
12
You can’t perform that action at this time.
0 commit comments