Wait for visibility change in the issue15053
integration test
Especially on slower bots there is some time between clicking the element and the actual visibility change, but we didn't await this and checked the visibility state immediately after clicking. This can be reproduced 100% of the time by introducing a delay in the `display` and `hidden` handlers of the `_commonActions` shadow call. This commit fixes the problem by waiting until the first visibility change actually happened before continuing with the assertions.
This commit is contained in:
parent
97819891b6
commit
01428f1e23
@ -1414,6 +1414,9 @@ describe("Interaction", () => {
|
||||
.toEqual("visible");
|
||||
|
||||
await page.click(getSelector("44R"));
|
||||
await page.waitForFunction(
|
||||
`document.querySelector("[data-annotation-id='35R']").style.visibility === "hidden"`
|
||||
);
|
||||
|
||||
visibility = await page.$eval(
|
||||
"[data-annotation-id='35R']",
|
||||
|
Loading…
x
Reference in New Issue
Block a user