From 1245eedc53476b37fcb44d0e4b7d4d0a43fd2540 Mon Sep 17 00:00:00 2001 From: rounak bhatia Date: Mon, 10 Feb 2025 11:43:36 +0530 Subject: [PATCH 1/2] fix duplicate queries error --- bin/accessibility-automation/cypress/index.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/accessibility-automation/cypress/index.js b/bin/accessibility-automation/cypress/index.js index 613e3a35..851367b7 100644 --- a/bin/accessibility-automation/cypress/index.js +++ b/bin/accessibility-automation/cypress/index.js @@ -424,7 +424,10 @@ 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; + } From 3f21271fe6bc843ebb140f6adcb2e2fc893b292b Mon Sep 17 00:00:00 2001 From: rounak bhatia Date: Mon, 10 Feb 2025 18:46:22 +0530 Subject: [PATCH 2/2] remove extra space --- bin/accessibility-automation/cypress/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/accessibility-automation/cypress/index.js b/bin/accessibility-automation/cypress/index.js index 851367b7..8b2d1290 100644 --- a/bin/accessibility-automation/cypress/index.js +++ b/bin/accessibility-automation/cypress/index.js @@ -430,4 +430,4 @@ if (!Cypress.Commands.hasOwnProperty('_browserstackSDKQueryAdded')) { return () => cy.getSubjectFromChain(chaining); }); Cypress.Commands._browserstackSDKQueryAdded = true; - } +}