test: Cypress - Flaky fix (#22247)
## Description - This PR fixes below flaky test in CI: - Button_onClickAction_spec.js ## Type of change - Script fix (non-breaking change which fixes CI failure issue) ## 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:
parent
afc278fd9b
commit
217c40b20b
|
|
@ -18,13 +18,9 @@ describe("Button Widget Functionality", function () {
|
||||||
//creating the Modal and verify Modal name
|
//creating the Modal and verify Modal name
|
||||||
cy.createModal(this.data.ModalName, "onClick");
|
cy.createModal(this.data.ModalName, "onClick");
|
||||||
cy.PublishtheApp();
|
cy.PublishtheApp();
|
||||||
|
cy.wait(3000); //for page to load fully
|
||||||
cy.get(publishPage.buttonWidget).should("be.visible");
|
cy.get(publishPage.buttonWidget).should("be.visible");
|
||||||
cy.get(publishPage.buttonWidget).click();
|
cy.get(publishPage.buttonWidget).click();
|
||||||
cy.get("body").then(($ele) => {
|
|
||||||
if ($ele.find(modalWidgetPage.modelTextField).length <= 0) {
|
|
||||||
cy.get(publishPage.buttonWidget).click({ force: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
cy.get(modalWidgetPage.modelTextField).should(
|
cy.get(modalWidgetPage.modelTextField).should(
|
||||||
"have.text",
|
"have.text",
|
||||||
this.data.ModalName,
|
this.data.ModalName,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user