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) => {
3131 console . log ( `Accessibility Automation will not run on legacy headless mode. Switch to new headless mode or avoid using headless mode.` ) ;
3232 browser_validation = false ;
3333 }
34+ if ( ! process . env . ACCESSIBILITY ) {
35+ console . log ( `Accessibility Automation is disabled.` ) ;
36+ browser_validation = false ;
37+ }
3438 if ( browser_validation ) {
3539
3640 const accessibility_ext_path = process . env . ACCESSIBILITY_EXTENSION_PATH
@@ -48,6 +52,8 @@ const Accessibility = (on, config) => {
4852 config . env . BEST_PRACTICE = process . env . BEST_PRACTICE ;
4953 config . env . NEEDS_REVIEW = process . env . NEEDS_REVIEW ;
5054 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 )
5157 console . log ( `parameter for accessibility report WCAG_CRITERIA - ` + config . env . WCAG_CRITERIA )
5258 console . log ( `parameter for accessibility report BEST_PRACTICE -` + config . env . BEST_PRACTICE )
5359 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) => {
106106 }
107107
108108 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+ }
109114
110115// const attributes = Cypress.mocha.getRunner().suite.ctx.currentTest || Cypress.mocha.getRunner().suite.ctx._runnable;
111116
You can’t perform that action at this time.
0 commit comments