From c408ae13906ecd0153b2192a831e861ffb453dfd Mon Sep 17 00:00:00 2001 From: Turtle Date: Wed, 21 Oct 2026 18:59:23 +0800 Subject: [PATCH] test(plugin-manager): pin the title-only header motion away from font-dependent widths Linux CI lays the title-only header at 470px with the actions beside the title, while macOS wraps them, so that width depends on the platform font. The title-only case now records 1280, 600, and 390px; the tabs case keeps all four widths. --- .../expected/plugin-manager/header-natural-motion.expected.md | 1 - apps/web/tests/plugin-sticky-motion.e2e.ts | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/tests/expected/plugin-manager/header-natural-motion.expected.md b/apps/web/tests/expected/plugin-manager/header-natural-motion.expected.md index 378e8643d0..e1561e6f7c 100644 --- a/apps/web/tests/expected/plugin-manager/header-natural-motion.expected.md +++ b/apps/web/tests/expected/plugin-manager/header-natural-motion.expected.md @@ -2,7 +2,6 @@ - Title / 1280px: resting title 28, actions 28, tabs none; pinned actions 16, tabs none, bar 64; stable range, reversible coordinates, same controls. - Title / 600px: resting title 28, actions 28, tabs none; pinned actions 16, tabs none, bar 64; stable range, reversible coordinates, same controls. -- Title / 470px: resting title 28, actions 96, tabs none; pinned actions 16, tabs none, bar 64; stable range, reversible coordinates, same controls. - Title / 390px: resting title 28, actions 96, tabs none; pinned actions 16, tabs none, bar 64; stable range, reversible coordinates, same controls. - Tabs / 1280px: resting title 28, actions 28, tabs 96; pinned actions 17, tabs 16, bar 66; stable range, reversible coordinates, same controls. - Tabs / 600px: resting title 28, actions 97, tabs 96; pinned actions 17, tabs 16, bar 66; stable range, reversible coordinates, same controls. diff --git a/apps/web/tests/plugin-sticky-motion.e2e.ts b/apps/web/tests/plugin-sticky-motion.e2e.ts index 15a8e88e16..ada88dbe66 100644 --- a/apps/web/tests/plugin-sticky-motion.e2e.ts +++ b/apps/web/tests/plugin-sticky-motion.e2e.ts @@ -82,7 +82,9 @@ it('preserves both header layouts and follows the scroll position without changi await page.locator('[data-plugin-package]').first().waitFor() await page.locator('[data-plugin-bar][data-natural]').waitFor() await page.evaluate(() => document.fonts.ready) - for (const width of [1280, 600, 470, 390]) { + // Without tabs, whether the actions fit beside the title at 470px depends on the platform font, + // so that width is pinned only with tabs. + for (const width of hasTabs ? [1280, 600, 470, 390] : [1280, 600, 390]) { await page.setViewportSize({ width, height: 480 }) await scrollTo(page, 0) const resting = await reference(page, false)