File tree 2 files changed +26
-12
lines changed
templates/app/e2e/account(auth)/login
2 files changed +26
-12
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,19 @@ describe('Login View', function() {
56
56
describe ( 'with local auth' , function ( ) {
57
57
58
58
it ( 'should login a user and redirecting to "/"' , function ( ) {
59
- page . login ( testUser ) ;
60
-
61
- var navbar = require ( '../../components/navbar/navbar.po' ) ;
62
-
63
- expect ( browser . getCurrentUrl ( ) ) . toBe ( config . baseUrl + '/' ) ;
64
- expect ( navbar . navbarAccountGreeting . getText ( ) ) . toBe ( 'Hello ' + testUser . name ) ;
59
+ page . login ( testUser ) . then ( ( ) => {
60
+ var navbar = require ( '../../components/navbar/navbar.po' ) ;
61
+ let mainPage = require ( '../../main/main.po' ) ;
62
+
63
+ browser . wait (
64
+ ( ) => element ( by . css ( '.hero-unit' ) ) ,
65
+ 5000 ,
66
+ `Didn't find .hero-unit after 5s`
67
+ ) ;
68
+
69
+ expect ( browser . getCurrentUrl ( ) ) . toBe ( config . baseUrl + '/' ) ;
70
+ expect ( navbar . navbarAccountGreeting . getText ( ) ) . toBe ( 'Hello ' + testUser . name ) ;
71
+ } ) ;
65
72
} ) ;
66
73
67
74
it ( 'should indicate login failures' , function ( ) {
Original file line number Diff line number Diff line change @@ -56,12 +56,19 @@ describe('Login View', function() {
56
56
describe ( 'with local auth' , function ( ) {
57
57
58
58
it ( 'should login a user and redirecting to "/"' , function ( ) {
59
- page . login ( testUser ) ;
60
-
61
- var navbar = require ( '../../components/navbar/navbar.po' ) ;
62
-
63
- < %= expect ( ) % > browser . getCurrentUrl ( ) < %= to ( ) % > . eventually . equal ( config . baseUrl + '/' ) ;
64
- < %= expect ( ) % > navbar . navbarAccountGreeting . getText ( ) < %= to ( ) % > . eventually . equal ( 'Hello ' + testUser . name ) ;
59
+ page . login ( testUser ) . then ( ( ) => {
60
+ var navbar = require ( '../../components/navbar/navbar.po' ) ;
61
+ let mainPage = require ( '../../main/main.po' ) ;
62
+
63
+ browser . wait (
64
+ ( ) => element ( by . css ( '.hero-unit' ) ) ,
65
+ 5000 ,
66
+ `Didn't find .hero-unit after 5s`
67
+ ) ;
68
+
69
+ < %= expect ( ) % > browser . getCurrentUrl ( ) < %= to ( ) % > . eventually . equal ( config . baseUrl + '/' ) ;
70
+ < %= expect ( ) % > navbar . navbarAccountGreeting . getText ( ) < %= to ( ) % > . eventually . equal ( 'Hello ' + testUser . name ) ;
71
+ } ) ;
65
72
} ) ;
66
73
67
74
describe ( 'and invalid credentials' , function ( ) {
You can’t perform that action at this time.
0 commit comments