@@ -127,7 +127,7 @@ const processAccessibilityReport = async (windowNew) => {
127
127
needsReview : needsReviewValue
128
128
} ;
129
129
130
- console . log ( 'log' , "SET SCAN: Payload to send: for url: " , payloadToSend ) ;
130
+ console . log ( 'log' , "SET SCAN: Payload to send: " , payloadToSend ) ;
131
131
try {
132
132
let setResult = await setScanConfig ( windowNew , payloadToSend ) ;
133
133
console . log ( 'SET SCAN: response:' , setResult ) ;
@@ -285,8 +285,16 @@ if (overRideCommands) {
285
285
oldprocessAccessibilityReport ( win ) ;
286
286
} )
287
287
} )
288
+ }
289
+ afterEach ( ( ) => {
290
+ if ( overRideCommands ) {
291
+ cy . window ( ) . then ( async ( win ) => {
292
+ let isAccessibilityLoaded = Cypress . env ( "ACCESSIBILITY" ) || false ;
293
+ if ( ! isAccessibilityLoaded ) return cy . wrap ( { } ) ;
288
294
289
- afterEach ( ( ) => {
295
+ cy . wrap ( processAccessibilityReport ( win ) , { timeout : 30000 } )
296
+ } ) ;
297
+ } else {
290
298
console . log ( "after each hook" )
291
299
let isAccessibilityLoaded = Cypress . env ( "ACCESSIBILITY" ) || false ;
292
300
if ( ! isAccessibilityLoaded ) {
@@ -296,10 +304,9 @@ if (overRideCommands) {
296
304
cy . window ( ) . then ( ( win ) => {
297
305
oldprocessAccessibilityReport ( win ) ;
298
306
} )
307
+ }
299
308
300
-
301
- } )
302
- }
309
+ } )
303
310
304
311
Cypress . Commands . addQuery ( 'performScanSubjectQuery' , function ( chaining , setTimeout ) {
305
312
this . set ( 'timeout' , setTimeout ) ;
0 commit comments