@@ -111,15 +111,13 @@ describe('cy.session', { retries: 0 }, () => {
111111 setupTestContext ( )
112112 cy . log ( 'create new session to test against' )
113113 cy . session ( 'session-1' , setup )
114- . wait ( 4 ) // ensure last log clear page has been updated
114+ cy . url ( ) . should ( 'eq' , 'about:blank' )
115115 } )
116116
117117 it ( 'successfully creates new session' , ( ) => {
118- cy . then ( ( ) => {
119- expect ( setup ) . to . be . calledOnce
120- // FIXME: currently page is cleared 3 times when it should clear 2 times
121- expect ( clearPageCount , 'total times session cleared the page' ) . to . eq ( 3 )
122- } )
118+ expect ( setup ) . to . be . calledOnce
119+ // FIXME: currently page is cleared 3 times when it should clear 2 times
120+ expect ( clearPageCount , 'total times session cleared the page' ) . to . eq ( 3 )
123121 } )
124122
125123 it ( 'groups session logs correctly' , ( ) => {
@@ -195,7 +193,7 @@ describe('cy.session', { retries: 0 }, () => {
195193 cy . log ( 'create new session with validation to test against' )
196194
197195 cy . session ( 'session-1' , setup , { validate } )
198- . wait ( 4 ) // ensure last log clear page has been updated
196+ cy . url ( ) . should ( 'eq' , 'about:blank' )
199197 } )
200198
201199 it ( 'successfully creates new session and validates it' , ( ) => {
@@ -347,7 +345,7 @@ describe('cy.session', { retries: 0 }, () => {
347345
348346 cy . log ( 'restore session to test against' )
349347 cy . session ( 'session-1' , setup )
350- . wait ( 4 ) // ensure last log clear page has been updated
348+ cy . url ( ) . should ( 'eq' , 'about:blank' )
351349 } )
352350
353351 it ( 'successfully restores saved session' , ( ) => {
@@ -405,7 +403,7 @@ describe('cy.session', { retries: 0 }, () => {
405403
406404 cy . log ( 'restore session to test against' )
407405 cy . session ( 'session-1' , setup , { validate } )
408- . wait ( 4 ) // ensure last log clear page has been updated
406+ cy . url ( ) . should ( 'eq' , 'about:blank' )
409407 } )
410408
411409 it ( 'successfully restores saved session' , ( ) => {
@@ -480,7 +478,7 @@ describe('cy.session', { retries: 0 }, () => {
480478
481479 cy . log ( 'restore session to test against' )
482480 cy . session ( 'session-1' , setup , { validate } )
483- . wait ( 4 ) // ensure last log clear page has been updated
481+ cy . url ( ) . should ( 'eq' , 'about:blank' )
484482 } )
485483
486484 it ( 'successfully recreates session' , ( ) => {
0 commit comments