From e7343d12ac62b817ba35ecc2dcb7554f3266043b Mon Sep 17 00:00:00 2001 From: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:12:29 +0530 Subject: [PATCH] test: Cypress - Flaky fix (#21860) ## Description - This PR fixes the welcome screen button click - which sometimes fails the spec in before hook itself ## Type of change - Script fix ## How Has This Been Tested? - Cypress local run ## Checklist: ### QA activity: - [X] Added Test Plan Approved label after reviewing all changes --- app/client/cypress/support/commands.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index 2966156af0..526cab7509 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -1260,9 +1260,9 @@ Cypress.Commands.add("createSuperUser", () => { //cy.get(welcomePage.dataCollection).trigger("mouseover").click(); //cy.wait(1000); //for toggles to settle cy.get(welcomePage.createButton).should("be.visible"); - cy.get(welcomePage.createButton).trigger("mouseover").click(); - //if seeing issue with above also, to try multiple click as below - //cy.get(welcomePage.createButton).click({ multiple: true }); + //cy.get(welcomePage.createButton).trigger("mouseover").click(); + //Seeing issue with above also, trying multiple click as below + cy.get(welcomePage.createButton).click({ multiple: true }); cy.wait("@createSuperUser").then((interception) => { expect(interception.request.body).contains( "allowCollectingAnonymousData=true",