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:
jparkerweb committed 2026-11-05 14:35:56 -08:00
1 parent da6b738fc8
commit 4352f3027d
2 files changed
+5 -1

No files matched your search

+4 -1
View File
@@ -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 ");