Skip to content

Commit bbd11a1

Browse files
committed
Fix for TRA Support File Patch Scope
1 parent 9705488 commit bbd11a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/testObservability/helper/helper.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ const getCypressCommandEventListener = (isJS) => {
284284
)
285285
}
286286

287+
const isE2ESupportFile = (file) => {
288+
return file.includes('e2e.js') || file.includes('e2e.ts');
289+
}
290+
287291
exports.setEventListeners = (bsConfig) => {
288292
try {
289293
const supportFilesData = helper.getSupportFiles(bsConfig, false);
@@ -292,7 +296,7 @@ exports.setEventListeners = (bsConfig) => {
292296
if(err) return exports.debug('EXCEPTION IN BUILD START EVENT : Unable to parse cypress support files');
293297
files.forEach(file => {
294298
try {
295-
if(!file.includes('commands.js')) {
299+
if (isE2ESupportFile(file) || !files.some(f => isE2ESupportFile(f))) {
296300
const defaultFileContent = fs.readFileSync(file, {encoding: 'utf-8'});
297301

298302
let cypressCommandEventListener = getCypressCommandEventListener(file.includes('js'));

0 commit comments

Comments
 (0)