From 2dd9b25a4441ac3fffc5a9d5df085cee66c30c36 Mon Sep 17 00:00:00 2001 From: ael-dev3 <183124839+ael-dev3@users.noreply.github.com> Date: Mon, 26 Oct 2026 19:49:28 +0100 Subject: [PATCH 1/2] test: align live navigation check with Library --- CHANGELOG.md | 1 + e2e/allthing.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c144ad40..49c3f4c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ All notable changes to Allthing are recorded here. The format follows [Keep a Ch ### Development +- Keep the live front-page check's exact navigation contract in step with the Home and Library links; first-paint, layout and interaction limits remain unchanged. - Library Back checks compare with the card position at the actual click, after browser actionability scrolling, while retaining the two-pixel restoration limit and exact cached-page checks. - Move build orchestration, Brotli compression, repository validation, asset-credit checks, deployment waiting, isolated database-module checks, audit handling and browser fixture orchestration into native Rust `xtask` commands. Retain official Playwright tests and independent cryptography, SQL and SDK codec checks. diff --git a/e2e/allthing.spec.ts b/e2e/allthing.spec.ts index 14c8e60f..6ff3d411 100644 --- a/e2e/allthing.spec.ts +++ b/e2e/allthing.spec.ts @@ -146,10 +146,10 @@ test.describe("front page", () => { await expect(page.locator(".cast-card .origin").first()).toContainText("via "); await expect(page.locator(".score")).toHaveCount(0); - // 0.3: no backend badges, intro, ranking or keyboard boxes; a Home button, + // No backend badges, intro, ranking or keyboard boxes; Home and Library links, // and a one-line footer with the version. await expect(page.locator(".backend")).toHaveCount(0); - await expect(page.locator(".main-nav a")).toHaveText(["Home"]); + await expect(page.locator(".main-nav a")).toHaveText(["Home", "Library"]); // No sidebar: the feed is one centered column. await expect(page.locator(".side")).toHaveCount(0); const feed = await page.locator(".columns .content").boundingBox(); From b3132535741beb0728bc6e27331483eaf768e532 Mon Sep 17 00:00:00 2001 From: ael-dev3 <183124839+ael-dev3@users.noreply.github.com> Date: Mon, 26 Oct 2026 20:10:28 +0100 Subject: [PATCH 2/2] test: pause search clock before mounting the app --- CHANGELOG.md | 1 + e2e/search-typeahead.fixture.spec.ts | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49c3f4c4..405e81d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ All notable changes to Allthing are recorded here. The format follows [Keep a Ch ### Development +- Pause the search fixture's clock before navigation so an old real-time timer cannot move it backward; preserve the exact timer-cancellation and 250 ms debounce checks. - Keep the live front-page check's exact navigation contract in step with the Home and Library links; first-paint, layout and interaction limits remain unchanged. - Library Back checks compare with the card position at the actual click, after browser actionability scrolling, while retaining the two-pixel restoration limit and exact cached-page checks. diff --git a/e2e/search-typeahead.fixture.spec.ts b/e2e/search-typeahead.fixture.spec.ts index d1602452..9ee44e71 100644 --- a/e2e/search-typeahead.fixture.spec.ts +++ b/e2e/search-typeahead.fixture.spec.ts @@ -27,7 +27,11 @@ async function serve(page: Page) { /** Playwright's 1e12 timer IDs must survive the browser's WebIDL i32 ABI. */ async function browserClock(page: Page) { - await page.clock.install({ time: Date.now() }); + const at = Date.now(); + await page.clock.install({ time: at }); + // Pause before navigation: an in-flight real-time clock callback from the + // mounted app can otherwise finish after pauseAt and move ticks backward. + await page.clock.pauseAt(at + 1000); await page.addInitScript(() => { // Native browser handles fit i32. Without aliases, web-sys truncates the // clock's 1e12 handles and cancellation silently leaves old timers live. @@ -70,7 +74,6 @@ test("suggestions appear as you type: people, channels and posts", async ({ page const box = page.getByRole("combobox", { name: "Search casts, people and channels", exact: true }); // Keep real keyboard/input events, but control the gaps: a busy host can // otherwise turn a requested 40 ms gap into a genuine 250 ms pause. - await page.clock.pauseAt(await page.evaluate(() => Date.now() + 1000)); const handles = await page.evaluate(() => { (window as any).__clockProbe = []; const note = (...args: unknown[]) => (window as any).__clockProbe.push(args);