Skip to content

Commit 2ac3415

Browse files
committed
added flag for accessiblity
1 parent 6fc680c commit 2ac3415

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

accessibility/scanner/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ cy.window().then((win) => {
8484
let wcagCriteriaValue = Cypress.env("WCAG_CRITERIA") || "wcag21a";
8585
let bestPracticeValue = Cypress.env("BEST_PRACTICE") || false;
8686
let needsReviewValue = Cypress.env("NEEDS_REVIEW") || false;
87+
88+
bestPracticeValue = bestPracticeValue == "true" ? true : false;
89+
needsReviewValue = needsReviewValue == "true" ? true : false;
8790

8891
const payloadToSend = {
8992
message: 'SET_CONFIG',
@@ -152,6 +155,15 @@ console.log("after each hook")
152155
let wcagCriteriaValue = Cypress.env("WCAG_CRITERIA") || "wcag21a";
153156
let bestPracticeValue = Cypress.env("BEST_PRACTICE") || false;
154157
let needsReviewValue = Cypress.env("NEEDS_REVIEW") || false;
158+
159+
bestPracticeValue = bestPracticeValue == "true" ? true : false;
160+
needsReviewValue = needsReviewValue == "true" ? true : false;
161+
162+
let isAccessibilityLoaded = Cypress.env("ACCESSIBILITY") || false;
163+
if (!isAccessibilityLoaded){
164+
console.log('log', "accessibility not enabled " + isAccessibilityLoaded);
165+
return;
166+
}
155167

156168
const payloadToSend = {
157169
message: 'SET_CONFIG',

0 commit comments

Comments
 (0)