@@ -225,6 +225,7 @@ exports.setAccessibilityEventListeners = (bsConfig) => {
225
225
const isPattern = glob . hasMagic ( supportFilesData . supportFile ) ;
226
226
if ( ! isPattern ) {
227
227
console . log ( `Using user defined support file: ${ supportFilesData . supportFile } ` ) ;
228
+ let file ;
228
229
try {
229
230
file = process . cwd ( ) + supportFilesData . supportFile ;
230
231
const defaultFileContent = fs . readFileSync ( file , { encoding : 'utf-8' } ) ;
@@ -245,7 +246,6 @@ exports.setAccessibilityEventListeners = (bsConfig) => {
245
246
}
246
247
247
248
const globPattern = process . cwd ( ) + supportFilesData . supportFile ;
248
- console . log ( `Using glob pattern to find support files: ${ globPattern } ` ) ;
249
249
glob ( globPattern , { } , ( err , files ) => {
250
250
if ( err ) {
251
251
logger . debug ( 'EXCEPTION IN BUILD START EVENT : Unable to parse cypress support files' ) ;
@@ -255,31 +255,25 @@ exports.setAccessibilityEventListeners = (bsConfig) => {
255
255
files . forEach ( file => {
256
256
try {
257
257
const fileName = path . basename ( file ) ;
258
- console . log ( `Found support file: ${ file } ` ) ;
259
- console . log ( `File name: ${ fileName } ` ) ;
260
258
if ( [ 'e2e.js' , 'e2e.ts' , 'component.ts' , 'component.js' ] . includes ( fileName ) && ! file . includes ( 'node_modules' ) ) {
261
259
262
260
const defaultFileContent = fs . readFileSync ( file , { encoding : 'utf-8' } ) ;
263
261
let cypressCommandEventListener = getAccessibilityCypressCommandEventListener ( path . extname ( file ) ) ;
264
- console . log ( `Cypress command event listener: ${ cypressCommandEventListener } ` ) ;
265
262
if ( ! defaultFileContent . includes ( cypressCommandEventListener ) ) {
266
263
let newFileContent = defaultFileContent +
267
264
'\n' +
268
265
cypressCommandEventListener +
269
266
'\n' ;
270
267
fs . writeFileSync ( file , newFileContent , { encoding : 'utf-8' } ) ;
271
- console . log ( `Updated file content for ${ file } : ${ newFileContent } ` ) ;
272
268
supportFileContentMap [ file ] = supportFilesData . cleanupParams ? supportFilesData . cleanupParams : defaultFileContent ;
273
269
}
274
270
}
275
271
} catch ( e ) {
276
- console . log ( `Error updating file content for ${ file } : ${ e } ` ) ;
277
272
logger . debug ( `Unable to modify file contents for ${ file } to set event listeners with error ${ e } ` , true , e ) ;
278
273
}
279
274
} ) ;
280
275
} ) ;
281
276
} catch ( e ) {
282
- console . log ( `Error updating file content for2 ${ file } : ${ e } ` ) ;
283
277
logger . debug ( `Unable to parse support files to set event listeners with error ${ e } ` , true , e ) ;
284
278
}
285
279
}
0 commit comments