From 958c0f4ccccf92cf6b30ed3db53c78b824fb7e33 Mon Sep 17 00:00:00 2001 From: Justin Parker Date: Thu, 5 Nov 2026 19:25:50 -0800 Subject: [PATCH] Let the page go quiet before typing in the Markdown answer box test AI Assisted --- scripts/test-web-console-page-cards.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/test-web-console-page-cards.mjs b/scripts/test-web-console-page-cards.mjs index 21788d4..eaa4659 100644 --- a/scripts/test-web-console-page-cards.mjs +++ b/scripts/test-web-console-page-cards.mjs @@ -49,6 +49,9 @@ test("the answer box renders Markdown live, like the Notebook", async (t) => { const content = card.locator(".md-host .cm-content"); await content.waitFor({ timeout: 15000 }); assert.equal(await card.locator("textarea").count(), 0, "the answer box is the Markdown editor, not a textarea"); + // A redraw that lands while the box is typed in sends the caret back to the start (seen on + // slow runners as "plain**bold**"): let the page go quiet before typing. + await settled(s.page, "#main"); await content.click(); await content.pressSequentially("**bold**\nplain"); await card.locator(".cm-strong", { hasText: "bold" }).waitFor();