mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-17 04:45:33 -08:00
Fix two flaky page tests: wait for the editor before scrolling a card, and poll for the saved Welcome instead of a waitForFunction that returned at once
AI Assisted
This commit is contained in:
1 parent
8ddf37911e
commit
da6b738fc8
2 files changed
+7
-1
No files matched your search
@@ -225,6 +225,11 @@ test("a redraw keeps your place: the scroll and the focused field survive an age
|
||||
},
|
||||
});
|
||||
|
||||
// The answer box's editor mounts after the first draw and may redraw the
|
||||
// card: wait for it before scrolling, so no redraw can replace the card
|
||||
// between the scroll and the agent's post.
|
||||
await itemCard(s.page, "q1").locator(".md-host .cm-content").first().waitFor();
|
||||
|
||||
// Reading a question part-way down: the card scrolls itself.
|
||||
const card = itemCard(s.page, "q1");
|
||||
assert.equal(await scrollCard(card, 400), 400, "the question card scrolls");
|
||||
|
||||
Reference in new issue
Block a user