File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
packages/driver/cypress/e2e/e2e/origin/commands Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -3,54 +3,31 @@ import { findCrossOriginLogs } from '../../../../support/utils'
33declare global {
44 interface Window {
55 xhrGet : any
6- abortRequests : any
76 }
87}
98
10- let reqQueue : XMLHttpRequest [ ] = [ ]
11-
129const xhrGet = ( url ) => {
1310 const xhr = new window . XMLHttpRequest ( )
1411
1512 xhr . open ( 'GET' , url )
16- reqQueue . push ( xhr )
1713 xhr . send ( )
1814}
1915
20- const abortRequests = ( ) => {
21- reqQueue . forEach ( ( xhr ) => xhr . abort ( ) )
22- reqQueue = [ ]
23- }
24-
2516context ( 'cy.origin waiting' , { browser : '!webkit' } , ( ) => {
2617 before ( ( ) => {
2718 cy . origin ( 'http://www.foobar.com:3500' , ( ) => {
28- let reqQueue : XMLHttpRequest [ ] = [ ]
29-
3019 window . xhrGet = ( url ) => {
3120 const xhr = new window . XMLHttpRequest ( )
3221
3322 xhr . open ( 'GET' , url )
34- reqQueue . push ( xhr )
3523 xhr . send ( )
3624 }
37-
38- window . abortRequests = ( ) => {
39- reqQueue . forEach ( ( xhr ) => xhr . abort ( ) )
40- reqQueue = [ ]
41- }
4225 } )
4326 } )
4427
4528 let logs : Map < string , any >
4629
4730 beforeEach ( ( ) => {
48- cy . origin ( 'http://www.foobar.com:3500' , ( ) => {
49- window . abortRequests ( )
50- } )
51-
52- abortRequests ( )
53-
5431 logs = new Map ( )
5532
5633 cy . on ( 'log:changed' , ( attrs , log ) => {
You can’t perform that action at this time.
0 commit comments