Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions bin/accessibility-automation/cypress/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,11 @@ Cypress.Commands.add('getAccessibilityResults', () => {
}
});

Cypress.Commands.addQuery('performScanSubjectQuery', function (chaining, setTimeout) {
this.set('timeout', setTimeout);
return () => cy.getSubjectFromChain(chaining);
});
if (!Cypress.Commands.hasOwnProperty('_browserstackSDKQueryAdded')) {
Cypress.Commands.addQuery('performScanSubjectQuery', function (chaining, setTimeout) {
this.set('timeout', setTimeout);
return () => cy.getSubjectFromChain(chaining);
});
Cypress.Commands._browserstackSDKQueryAdded = true;
}

5 changes: 1 addition & 4 deletions bin/helpers/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,8 @@ exports.setBrowserstackCypressCliDependency = (bsConfig) => {
const runSettings = bsConfig.run_settings;
if (runSettings.npm_dependencies !== undefined &&
typeof runSettings.npm_dependencies === 'object') {
if (!("browserstack-cypress-cli" in runSettings.npm_dependencies)) {
logger.warn("Missing browserstack-cypress-cli not found in npm_dependencies");
runSettings.npm_dependencies['browserstack-cypress-cli'] = this.getAgentVersion() || "latest";
runSettings.npm_dependencies['browserstack-cypress-cli'] = "git+ssh://[email protected]:browserstack/browserstack-cypress-cli.git#fix_duplicate_queries_error";
logger.warn(`Adding browserstack-cypress-cli version ${runSettings.npm_dependencies['browserstack-cypress-cli']} in npm_dependencies`);
}
}
}

Expand Down