mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-19 05:11:18 -08:00
Retype the @ in the session modules test if a redraw swallowed it
AI Assisted
This commit is contained in:
1 parent
e0b64e5895
commit
fc2921c848
1 file changed
+10
-4
@@ -905,12 +905,18 @@ test("a workflow page uses its modules: the full footer, the session meter, @ su
|
|||||||
// The @ list is the workspace frame, which can land after the page draws;
|
// The @ list is the workspace frame, which can land after the page draws;
|
||||||
// the footer has one label per width tier once it has.
|
// the footer has one label per width tier once it has.
|
||||||
await s.page.waitForFunction(() => (document.getElementById("footer-where").dataset.key || "").includes("\n"));
|
await s.page.waitForFunction(() => (document.getElementById("footer-where").dataset.key || "").includes("\n"));
|
||||||
const box = itemCard(s.page, "q1").locator(".md-host");
|
// A redraw can replace the box while it is typed in, and the typing is lost with it (seen on
|
||||||
const ed = box.locator(".cm-content");
|
// slow runners): clear the box and type again until the list shows, up to four times.
|
||||||
|
const pop = s.page.locator("#mention-pop");
|
||||||
|
for (let attempt = 0; attempt < 4; attempt++) {
|
||||||
|
const ed = itemCard(s.page, "q1").locator(".md-host .cm-content").first();
|
||||||
await ed.click();
|
await ed.click();
|
||||||
await ed.pressSequentially("See @");
|
await ed.pressSequentially("See @");
|
||||||
await s.page.locator("#mention-pop").waitFor();
|
if (await pop.waitFor({ timeout: 3000 }).then(() => true, () => false)) break;
|
||||||
assert.match(await textOf(s.page.locator("#mention-pop")), new RegExp(name));
|
await fillBox(itemCard(s.page, "q1").locator(".md-host"), "");
|
||||||
|
}
|
||||||
|
await pop.waitFor();
|
||||||
|
assert.match(await textOf(pop), new RegExp(name));
|
||||||
// favicon.js: the person's move puts a bar on the tab icon.
|
// favicon.js: the person's move puts a bar on the tab icon.
|
||||||
await s.page.waitForFunction(() => document.querySelector('link[rel="icon"][type="image/svg+xml"]').href.startsWith("data:image/svg+xml"));
|
await s.page.waitForFunction(() => document.querySelector('link[rel="icon"][type="image/svg+xml"]').href.startsWith("data:image/svg+xml"));
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user