mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 04:45:33 -08:00
Fix two macOS-only test races: wait for F to fill the screen, and pick a mention from the page instead of clicking a list that repaints
AI Assisted
This commit is contained in:
1 parent
da6b738fc8
commit
4352f3027d
2 files changed
+5
-1
No files matched your search
@@ -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");
|
||||
|
||||
@@ -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 ");
|
||||
|
||||
|
||||
Reference in new issue
Block a user