diff --git a/apps/web/tests/expected/plugin-manager/header-responsive.expected.md b/apps/web/tests/expected/plugin-manager/header-responsive.expected.md index 956ddbda34..73723e7184 100644 --- a/apps/web/tests/expected/plugin-manager/header-responsive.expected.md +++ b/apps/web/tests/expected/plugin-manager/header-responsive.expected.md @@ -1,7 +1,7 @@ # Plugin header responsive layout en 1680px: actions beside the heading, single-line; contained; information follows subtitle; focus retained -en 768px: actions below the heading, single-line; contained; information follows subtitle; focus retained +en 768px: actions beside the heading, single-line; contained; information follows subtitle; focus retained en 520px: actions below the heading, single-line; contained; information follows subtitle; focus retained en 440px: actions below the heading, single-line; contained; information follows subtitle; focus retained en 390px: actions below the heading, single-line; contained; information follows subtitle; focus retained diff --git a/apps/web/tests/plugin-manager.e2e.ts b/apps/web/tests/plugin-manager.e2e.ts index 15937b97ff..929ee5dafa 100644 --- a/apps/web/tests/plugin-manager.e2e.ts +++ b/apps/web/tests/plugin-manager.e2e.ts @@ -125,8 +125,11 @@ describe('web e2e: plugin manager', () => { const add = header.getByRole('button', { name: language === 'en' ? 'Add plugin' : '添加插件', exact: true }) await expect.poll(() => add.isEnabled()).toBe(true) await add.focus() + const frame = probe.locator('[data-shell-bottom]').locator('..') for (const width of [1680, 768, 520, 440, 390, 430, 1024]) { await probe.setViewportSize({ width, height: 1000 }) + // The responsive sidebar changes the header's available width after ResizeObserver delivery. + await expect.poll(() => frame.getAttribute('data-sidebar-collapsed')).toBe(width < 1024 ? 'true' : null) const measure = () => header.evaluate((element) => { const heading = element.firstElementChild! const actions = element.lastElementChild!