Wait for selector instead of timeout in the freetext double click move integration test
This integration test currently fails intermittently on the bots because of the fixed timeout in the test, which is sometimes too low on slower systems. The issue can be reproduced 100% of the time by introducing a delay just before dispatching the `switchannotationeditormode` event. Puppeteer also discourages this and instead recommends waiting for a selector instead, which we now do here. This ensures that the test only continues if the element under test is available and therefore prevents any timing problems.
This commit is contained in:
parent
97819891b6
commit
1b3ccf1321
@ -1176,7 +1176,7 @@ describe("FreeText Editor", () => {
|
||||
await Promise.all(
|
||||
pages.map(async ([browserName, page]) => {
|
||||
await page.click("[data-annotation-id='26R']", { clickCount: 2 });
|
||||
await page.waitForTimeout(10);
|
||||
await page.waitForSelector(`${getEditorSelector(0)}-editor`);
|
||||
|
||||
const [focusedId, editable] = await page.evaluate(() => {
|
||||
const el = document.activeElement;
|
||||
|
Loading…
Reference in New Issue
Block a user