File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ const Accessibility = (on, config) => {
31
31
console . log ( `Accessibility Automation will not run on legacy headless mode. Switch to new headless mode or avoid using headless mode.` ) ;
32
32
browser_validation = false ;
33
33
}
34
+ if ( ! process . env . ACCESSIBILITY ) {
35
+ console . log ( `Accessibility Automation is disabled.` ) ;
36
+ browser_validation = false ;
37
+ }
34
38
if ( browser_validation ) {
35
39
36
40
const accessibility_ext_path = process . env . ACCESSIBILITY_EXTENSION_PATH
@@ -48,6 +52,8 @@ const Accessibility = (on, config) => {
48
52
config . env . BEST_PRACTICE = process . env . BEST_PRACTICE ;
49
53
config . env . NEEDS_REVIEW = process . env . NEEDS_REVIEW ;
50
54
config . env . ACCESSIBILITY_REPORT_PATH = process . env . ACCESSIBILITY_REPORT_PATH ;
55
+ config . env . ACCESSIBILITY = process . env . ACCESSIBILITY ;
56
+ console . log ( `parameter for accessibility report ACCESSIBILITY - ` + config . env . ACCESSIBILITY )
51
57
console . log ( `parameter for accessibility report WCAG_CRITERIA - ` + config . env . WCAG_CRITERIA )
52
58
console . log ( `parameter for accessibility report BEST_PRACTICE -` + config . env . BEST_PRACTICE )
53
59
console . log ( `parameter for accessibility report NEEDS_REVIEW -` + config . env . NEEDS_REVIEW )
Original file line number Diff line number Diff line change @@ -106,6 +106,11 @@ Cypress.on('command:start', async (command) => {
106
106
}
107
107
108
108
if ( ! commandsToWrap . includes ( command . attributes . name ) ) return ;
109
+ let isAccessibilityLoaded = Cypress . env ( "ACCESSIBILITY" ) || false ;
110
+ if ( ! isAccessibilityLoaded ) {
111
+ console . log ( 'log' , "accessibility not enabled " + isAccessibilityLoaded ) ;
112
+ return ;
113
+ }
109
114
110
115
// const attributes = Cypress.mocha.getRunner().suite.ctx.currentTest || Cypress.mocha.getRunner().suite.ctx._runnable;
111
116
You can’t perform that action at this time.
0 commit comments