commit d1dfeed4415f0a5a819faafb91010e2db0ffd191
parent 2f4615cc30c07f120b45bb3b068a9aa0b467cc59
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 9 Oct 2026 20:54:53 -0400
umtool e2e: the evidence walk's first j waits for the keys to be live (a press before hydration was lost)
The trace shows the press landing ~30 ms before the walk hydrated (its
evidence fetch, an effect, starts after it); nothing in the walk changed.
The press now repeats until the walk moves — j at the last citation stays
there, so a repeat is safe.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/umtool/e2e/article-evidence.spec.ts b/umtool/e2e/article-evidence.spec.ts
@@ -53,8 +53,13 @@ test("the walk: one citation per screen, j/k, n notes it, the URL follows", asyn
await page.goto("/sites/priv/polemic-alpha/evidence");
await expect(page.locator("[data-walk='c1']")).toBeVisible();
await expect(page.locator("[data-walk-position]")).toHaveText("1 / 2");
- await page.keyboard.press("j");
- await expect(page.locator("[data-walk='c2']")).toBeVisible();
+ // The keys are live once the walk has hydrated, and `goto` resolves before
+ // that: a press that lands first is lost. j at the last citation stays
+ // there, so pressing again until it moves is safe.
+ await expect(async () => {
+ await page.keyboard.press("j");
+ await expect(page.locator("[data-walk='c2']")).toBeVisible({ timeout: 500 });
+ }).toPass({ timeout: 10_000 });
await expect(page).toHaveURL(/\?c=c2$/);
await page.keyboard.press("n");
await page.getByLabel("note text").fill("Needs a clip.");