Annotate test: wait for the article before Tab-ing through it
Keys pressed while an article is still arriving are held and then all act at once when it comes; tabTo looks after each Tab, so on a cold server a burst of held Tabs ran past the words it was looking for. The page does what was pressed; the test now waits for the article's text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
1 parent
8f6afaecdd
commit
e2a71d098a
1 file changed
+6
-2
@@ -96,9 +96,13 @@ test("an annotation is a note: Enter steps into it, and it is edited, undone, de
|
||||
await jump(page, "Recursion without names");
|
||||
await tabTo(page, "fixed-point combinator");
|
||||
await keys(page, "Enter");
|
||||
await keys(page, "i");
|
||||
await tabTo(page, "Haskell Curry");
|
||||
const art = page.locator(".wiki-pane").last();
|
||||
// Keys pressed while the article is still arriving wait for it and then all act at once; tabTo
|
||||
// looks after each Tab, so it waits for the article's text first.
|
||||
await expect(art.locator(".wiki-text").first()).toBeVisible();
|
||||
await keys(page, "i");
|
||||
await expect.poll(() => articleSelection(page)).not.toBeNull();
|
||||
await tabTo(page, "Haskell Curry");
|
||||
// Its words carry the dotted underline; e opens and closes it, as on a node; Enter opens it, and Enter again steps into it.
|
||||
await expect(art.locator(".wiki-text .anchor.a-gloss")).toHaveText("Haskell Curry");
|
||||
await expect(art.locator(".wiki-text .gloss")).toHaveCount(0);
|
||||
|
||||
Reference in new issue
Block a user