diff --git a/scripts/test-web-console-page-activities.mjs b/scripts/test-web-console-page-activities.mjs index 15872af..05e7bf0 100644 --- a/scripts/test-web-console-page-activities.mjs +++ b/scripts/test-web-console-page-activities.mjs @@ -1127,6 +1127,7 @@ test("Full screen gives the board the whole screen with a panel holding the scor const back = await fullParts(s); assert.ok(!back.full && !back.rail && !back.scoreInRail, "F puts it back, the score under the board again"); await s.page.keyboard.press("f"); + await until(async () => (await fullParts(s)).full, 5000); assert.ok((await fullParts(s)).full, "and F fills it again"); await s.page.click("#activities-rail-exit"); assert.ok(!(await fullParts(s)).full, "the panel's Exit full screen puts it back"); diff --git a/scripts/test-web-console-page-workspace.mjs b/scripts/test-web-console-page-workspace.mjs index edccfa6..910b7d4 100644 --- a/scripts/test-web-console-page-workspace.mjs +++ b/scripts/test-web-console-page-workspace.mjs @@ -86,7 +86,10 @@ test("an @ in a note offers the workspace's folders, and picking one writes its await pop.waitFor(); const options = pop.locator(".mention-opt"); assert.deepEqual(await options.allTextContents(), ["@datasets"], "only the folder that matches what was typed"); - await options.first().click(); + // The list repaints on every key release, so Playwright's click can lose + // its option to a repaint on a slow machine and retry for a minute: click + // the option in one step from the page instead. + await s.page.evaluate(() => document.querySelector("#mention-pop .mention-opt").click()); await pop.waitFor({ state: "detached" }); assert.equal(await boxValue(note), "Look in @datasets ");