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.
This commit is contained in:
Turtle committed 2026-10-21 18:59:23 +08:00
1 parent a3b26c896b
commit c408ae1390
2 files changed
+3 -2

No files matched your search

@@ -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.
+3 -1
View File
@@ -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)