Skip to content

Commit 4214c79

Browse files
authored
Merge pull request #963 from browserstack/SDK-2180
fix duplicate queries error - a11y
2 parents ce79655 + 3f21271 commit 4214c79

File tree

1 file changed

+7
-4
lines changed
  • bin/accessibility-automation/cypress

1 file changed

+7
-4
lines changed

bin/accessibility-automation/cypress/index.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,10 @@ Cypress.Commands.add('getAccessibilityResults', () => {
424424
}
425425
});
426426

427-
Cypress.Commands.addQuery('performScanSubjectQuery', function (chaining, setTimeout) {
428-
this.set('timeout', setTimeout);
429-
return () => cy.getSubjectFromChain(chaining);
430-
});
427+
if (!Cypress.Commands.hasOwnProperty('_browserstackSDKQueryAdded')) {
428+
Cypress.Commands.addQuery('performScanSubjectQuery', function (chaining, setTimeout) {
429+
this.set('timeout', setTimeout);
430+
return () => cy.getSubjectFromChain(chaining);
431+
});
432+
Cypress.Commands._browserstackSDKQueryAdded = true;
433+
}

0 commit comments

Comments
 (0)