Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions accessibility/scanner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const processAccessibilityReport = async (windowNew) => {
needsReview: needsReviewValue
};

console.log('log', "SET SCAN: Payload to send: for url: ", payloadToSend);
console.log('log', "SET SCAN: Payload to send: ", payloadToSend);
try {
let setResult = await setScanConfig(windowNew, payloadToSend);
console.log('SET SCAN: response:', setResult);
Expand Down Expand Up @@ -285,8 +285,16 @@ if (overRideCommands) {
oldprocessAccessibilityReport(win);
})
})
}
afterEach(() => {
if(overRideCommands){
cy.window().then(async (win) => {
let isAccessibilityLoaded = Cypress.env("ACCESSIBILITY") || false;
if (!isAccessibilityLoaded) return cy.wrap({});

afterEach(() => {
cy.wrap(processAccessibilityReport(win), {timeout: 30000})
});
}else{
console.log("after each hook")
let isAccessibilityLoaded = Cypress.env("ACCESSIBILITY") || false;
if (!isAccessibilityLoaded){
Expand All @@ -296,10 +304,9 @@ if (overRideCommands) {
cy.window().then((win) => {
oldprocessAccessibilityReport(win);
})
}


})
}
})

Cypress.Commands.addQuery('performScanSubjectQuery', function (chaining, setTimeout) {
this.set('timeout', setTimeout);
Expand Down