Skip to content

Commit 4e6c2d0

Browse files
committed
fix: e2e file modification
1 parent 7e65d23 commit 4e6c2d0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

bin/commands/runs.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ const { isTurboScaleSession, getTurboScaleGridDetails, patchCypressConfigFileCon
4141

4242
module.exports = function run(args, rawArgs) {
4343

44+
console.log(`BrowserStack Cypress CLI v${pkg.version}`);
45+
4446
markBlockStart('preBuild');
4547
// set debug mode (--cli-debug)
4648
utils.setDebugMode(args);
@@ -192,6 +194,10 @@ module.exports = function run(args, rawArgs) {
192194
logger.debug("Completed setting the configs");
193195

194196
if(!isBrowserstackInfra) {
197+
if(process.env.BS_TESTOPS_BUILD_COMPLETED) {
198+
setEventListeners(bsConfig);
199+
}
200+
195201
return runCypressTestsLocally(bsConfig, args, rawArgs);
196202
}
197203

@@ -202,8 +208,9 @@ module.exports = function run(args, rawArgs) {
202208
if(process.env.BROWSERSTACK_TEST_ACCESSIBILITY) {
203209
setAccessibilityEventListeners(bsConfig);
204210
}
211+
console.log('BrowserStack Test Observability Plugin initialized ' + process.env.BS_TESTOPS_BUILD_COMPLETED);
205212
if(process.env.BS_TESTOPS_BUILD_COMPLETED) {
206-
// setEventListeners(bsConfig);
213+
setEventListeners(bsConfig);
207214
}
208215
markBlockEnd('validateConfig');
209216
logger.debug("Completed configs validation");

bin/testObservability/cypress/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const browserStackLog = (message) => {
88
}
99

1010
const shouldSkipCommand = (command) => {
11-
return command.attributes.name == 'log' || (command.attributes.name == 'task' && (['test_observability_platform_details', 'test_observability_step', 'test_observability_command'].some(event => command.attributes.args.includes(event))));
11+
return command.attributes.name == 'log' || (command.attributes.name == 'task' && (['test_observability_platform_details', 'test_observability_step', 'test_observability_command', 'browserstack_log'].some(event => command.attributes.args.includes(event))));
1212
}
1313

1414
Cypress.on('log:added', (log) => {

0 commit comments

Comments
 (0)