diff --git a/packages/app/component-tests/activity-chips.spec.ts b/packages/app/component-tests/activity-chips.spec.ts index 3add92d44ed4..dcc7c882c8eb 100644 --- a/packages/app/component-tests/activity-chips.spec.ts +++ b/packages/app/component-tests/activity-chips.spec.ts @@ -1,7 +1,9 @@ import { expect, story } from "../../stories/playwright/story" story("shows how long each background item has been running, ticking while open", async ({ mount, page }) => { + // Time moves only when the test advances it, so waiting for fonts cannot add a tick. await page.clock.install({ time: new Date("2026-10-19T12:00:00Z") }) + await page.clock.pauseAt(new Date("2026-10-19T12:00:00Z")) await mount("session-activity-chips--subagents-and-shells") await page.locator('[data-slot="session-activity-chip"]').click() @@ -9,6 +11,8 @@ story("shows how long each background item has been running, ticking while open" // The story starts its subagents 12 s and 65 s ago, and its shells 62 min and 341 s ago. await expect(elapsed).toHaveText(["12s", "1m 05s", "1h 02m", "5m 41s"]) + // A late Inter swap widens the panel; measure after fonts settle. + await page.evaluate(() => document.fonts.ready.then(() => undefined)) const width = await page.locator('[data-slot="session-activity-panel"]').evaluate((node) => node.clientWidth) await page.clock.runFor(1_000) diff --git a/packages/app/component-tests/composer.spec.ts b/packages/app/component-tests/composer.spec.ts index 5bd24552dd02..95dde796838d 100644 --- a/packages/app/component-tests/composer.spec.ts +++ b/packages/app/component-tests/composer.spec.ts @@ -472,7 +472,7 @@ story("grows suggestions while preserving visible timeline context", async ({ mo const boundary = component.locator('[data-slot="composer-suggestion-boundary-story"]') const suggestions = component.locator('[data-component="composer-suggestions"]') - await expect(suggestions).toHaveCSS("max-height", "166px") + await expect(suggestions).toHaveCSS("max-height", "164px") await expect(suggestions).toHaveCSS("scroll-padding-bottom", "18px") await expect.poll(() => suggestions.evaluate((element) => element.scrollHeight > element.clientHeight)).toBe(true) await expect @@ -497,12 +497,12 @@ story("grows suggestions while preserving visible timeline context", async ({ mo await boundary.evaluate((element) => { element.style.height = "400px" }) - await expect(suggestions).toHaveCSS("max-height", "306px") + await expect(suggestions).toHaveCSS("max-height", "304px") }) story("ignores a detached suggestion boundary", async ({ mount }) => { const component = await mount("opencode-composer-flow--detached-command-suggestion-boundary") - await expect(component.locator('[data-component="composer-suggestions"]')).toHaveCSS("max-height", "306px") + await expect(component.locator('[data-component="composer-suggestions"]')).toHaveCSS("max-height", "304px") }) // ThemeProvider writes resolved token values into a