@@ -97,9 +97,7 @@ describe("Browser session tests, auto", () => {
9797describe ( "Browser session tests, manual 1" , ( ) => {
9898 it ( "Single sessions test with manual sessions" , ( ) => {
9999 cy . visit ( "./cypress/fixtures/session_test_manual_1.html?use_session_cookie=true" ) ;
100- cy . contains ( "Start" ) . click ( ) . wait ( waitTime ) ;
101- cy . contains ( "Event" ) . click ( ) . wait ( 300 ) ;
102- cy . contains ( "End" ) . click ( ) . wait ( 300 ) ;
100+ cy . wait ( waitTime + 1000 ) ;
103101 cy . visit ( "./cypress/fixtures/base.html" ) ;
104102 cy . fetch_local_request_queue ( app_key ) . then ( ( rq ) => {
105103 cy . log ( rq ) ;
@@ -109,10 +107,10 @@ describe("Browser session tests, manual 1", () => {
109107 cy . check_session ( rq [ 0 ] , undefined , undefined , app_key ) ;
110108 // third object of the queue should be about session extension, also input the expected duration
111109 cy . check_session ( rq [ 2 ] , 5 , undefined , app_key ) ;
112- // fourth object of the queue should be about event sent
113- cy . check_event ( JSON . parse ( rq [ 3 ] . events ) [ 0 ] , eventObj , undefined , false ) ;
114110 // fifth object of the queue should be about session extension, also input the expected duration
115- cy . check_session ( rq [ 4 ] , 1 , undefined , app_key ) ;
111+ cy . check_session ( rq [ 3 ] , 1 , undefined , app_key ) ;
112+ // fourth object of the queue should be about event sent
113+ cy . check_event ( JSON . parse ( rq [ 4 ] . events ) [ 0 ] , eventObj , undefined , false ) ;
116114 } ) ;
117115 } ) ;
118116} ) ;
@@ -160,12 +158,7 @@ describe("Browser session tests, auto, no cookie", () => {
160158describe ( "Browser session tests, manual 1, no cookie" , ( ) => {
161159 it ( "Single bounce test with manual sessions with no cookies" , ( ) => {
162160 cy . visit ( "./cypress/fixtures/session_test_manual_1.html" ) ;
163- cy . contains ( "Start" ) . click ( ) ;
164- cy . wait ( waitTime ) ;
165- cy . contains ( "Event" ) . click ( ) ;
166- cy . wait ( 300 ) ;
167- cy . contains ( "End" ) . click ( ) ;
168- cy . wait ( 300 ) ;
161+ cy . wait ( waitTime + 1000 ) ;
169162 cy . visit ( "./cypress/fixtures/base.html" ) ;
170163 cy . fetch_local_request_queue ( app_key ) . then ( ( rq ) => {
171164 cy . log ( rq ) ;
@@ -175,10 +168,10 @@ describe("Browser session tests, manual 1, no cookie", () => {
175168 cy . check_session ( rq [ 0 ] , undefined , undefined , app_key ) ;
176169 // third object of the queue should be about session extension, also input the expected duration
177170 cy . check_session ( rq [ 2 ] , 5 , undefined , app_key ) ;
178- // fourth object of the queue should be about event sent
179- cy . check_event ( JSON . parse ( rq [ 3 ] . events ) [ 0 ] , eventObj , undefined , false ) ;
180171 // fifth object of the queue should be about session extension, also input the expected duration
181- cy . check_session ( rq [ 4 ] , 1 , true , app_key ) ;
172+ cy . check_session ( rq [ 3 ] , 1 , true , app_key ) ;
173+ // fourth object of the queue should be about event sent
174+ cy . check_event ( JSON . parse ( rq [ 4 ] . events ) [ 0 ] , eventObj , undefined , false ) ;
182175 } ) ;
183176 } ) ;
184177} ) ;
0 commit comments