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
This commit is contained in:
Aishwarya-U-R 2023-03-29 15:12:29 +05:30 committed by GitHub
parent ee3bccdae2
commit e7343d12ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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",