test: Cypress | Fix PostWindowMessage_spec (#23807)

## Description
- This PR fixes the PostWindowMessage_spec flaky fix in CI runs

#### Type of change
- Script fix (non-breaking change which fixes an issue)

## Testing
#### How Has This Been Tested?
- [X] Cypress

## Checklist:
#### QA activity:
- [X] Added `Test Plan Approved` label after Cypress tests were reviewed
This commit is contained in:
Aishwarya-U-R 2023-05-29 16:49:53 +05:30 committed by GitHub
parent 0d1d9c6781
commit 025bbb6aa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,7 @@ describe("Post window message", () => {
agHelper.EnterActionValue("Message", "I got a message from iframe");
deployMode.DeployApp(locator._spanButton("Submit"));
agHelper.AssertElementVisible("#iframe-Iframe1");
agHelper.Sleep(5000); //allowing time for elements to load fully before clicking - for CI flaky
cy.get("#iframe-Iframe1").then((element) => {
element.contents().find("body").find("#iframe-button").click();
});