File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ describe('Authentication', () => {
2020 it ( 'should not login with incorrect credentials' , ( ) => {
2121 ListPage . navigate ( ) ;
2222 ListPage . logout ( ) ;
23- LoginPage . login ( 'foo' , 'bar' ) ;
23+ LoginPage . login ( 'foo' , 'bar' , true ) ;
2424 cy . contains ( 'Authentication failed, please retry' ) ;
2525 } ) ;
2626 it ( 'should login with correct credentials' , ( ) => {
Original file line number Diff line number Diff line change @@ -16,11 +16,13 @@ export default url => ({
1616 cy . get ( this . elements . username ) ;
1717 } ,
1818
19- login ( username = 'login' , password = 'password' ) {
19+ login ( username = 'login' , password = 'password' , shouldFail = false ) {
2020 cy . get ( this . elements . username ) . clear ( ) . type ( username ) ;
2121 cy . get ( this . elements . password ) . clear ( ) . type ( password ) ;
2222 cy . get ( this . elements . submitButton ) . click ( ) ;
23- cy . get ( this . elements . title ) ;
24- cy . get ( this . elements . appLoader ) ;
23+ if ( ! shouldFail ) {
24+ cy . get ( this . elements . title ) ;
25+ cy . get ( this . elements . appLoader ) ;
26+ }
2527 } ,
2628} ) ;
You can’t perform that action at this time.
0 commit comments