From f75bc4239fc26833dc3b1a83f9a3068c4a18f4de Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Fri, 12 Jun 2026 08:31:33 -0400 Subject: [PATCH] style(14-01): apply prettier formatting to layout.spec.ts for CI format:check gate --- apps/pwa/e2e/layout.spec.ts | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/apps/pwa/e2e/layout.spec.ts b/apps/pwa/e2e/layout.spec.ts index 99072d1..4e4e490 100644 --- a/apps/pwa/e2e/layout.spec.ts +++ b/apps/pwa/e2e/layout.spec.ts @@ -60,8 +60,13 @@ test.describe('Rule 1/3/4 — BottomTabBar tap targets and in-viewport position' expect(box!.height, 'Lists tab height ≥ 44px').toBeGreaterThanOrEqual(44); }); - test('BottomTabBar is fully in-viewport (Rule 3 — safe-area-inset)', async ({ page }, testInfo) => { - test.skip(testInfo.project.name === 'desktop', 'On desktop the Main navigation landmark resolves to the DesktopNav sidebar; the safe-area-inset bottom-edge assertion is semantically wrong for a sidebar (BottomTabBar returns null at ≥768px)'); + test('BottomTabBar is fully in-viewport (Rule 3 — safe-area-inset)', async ({ + page, + }, testInfo) => { + test.skip( + testInfo.project.name === 'desktop', + 'On desktop the Main navigation landmark resolves to the DesktopNav sidebar; the safe-area-inset bottom-edge assertion is semantically wrong for a sidebar (BottomTabBar returns null at ≥768px)', + ); // The bar uses env(safe-area-inset-bottom, 0px). In emulation there is no // safe-area-inset, so the bar's bottom edge must be ≤ viewport height. const nav = page.getByRole('navigation', { name: 'Main navigation' }); @@ -91,7 +96,10 @@ test.describe('Rule 1/3/4 — BottomTabBar tap targets and in-viewport position' }); test('New Event FAB meets 56×56px touch-target minimum (Rule 1)', async ({ page }, testInfo) => { - test.skip(testInfo.project.name === 'desktop', 'On desktop getByRole(button, New Event) resolves to the toolbar button (CalendarShell.tsx:436-457), not the 56×56 FAB; FAB geometry assertion does not apply to the toolbar button'); + test.skip( + testInfo.project.name === 'desktop', + 'On desktop getByRole(button, New Event) resolves to the toolbar button (CalendarShell.tsx:436-457), not the 56×56 FAB; FAB geometry assertion does not apply to the toolbar button', + ); // Phone-only FAB — aria-label="New Event", fixed 56×56px (CalendarShell.tsx) const fab = page.getByRole('button', { name: 'New Event' }); const box = await fab.boundingBox(); @@ -103,12 +111,20 @@ test.describe('Rule 1/3/4 — BottomTabBar tap targets and in-viewport position' // D-04 parity: desktop toolbar "New Event" button meets ≥44px minimum (Rule 1) // CalendarShell.tsx:443 sets minHeight:'44px' on the desktop toolbar button. // Guarded to run only on desktop — the FAB test above covers mobile profiles. - test('New Event toolbar button meets 44px touch-target minimum on desktop (Rule 1 — D-04 parity)', async ({ page }, testInfo) => { - test.skip(testInfo.project.name !== 'desktop', 'Desktop parity assertion — toolbar button only renders at ≥768px (Desktop Chrome); FAB test covers iphone/pixel'); + test('New Event toolbar button meets 44px touch-target minimum on desktop (Rule 1 — D-04 parity)', async ({ + page, + }, testInfo) => { + test.skip( + testInfo.project.name !== 'desktop', + 'Desktop parity assertion — toolbar button only renders at ≥768px (Desktop Chrome); FAB test covers iphone/pixel', + ); const toolbarBtn = page.getByRole('button', { name: 'New Event' }); const box = await toolbarBtn.boundingBox(); expect(box, 'New Event toolbar button bounding box must not be null').not.toBeNull(); - expect(box!.height, 'New Event toolbar button height ≥ 44px (Rule 1 desktop parity)').toBeGreaterThanOrEqual(44); + expect( + box!.height, + 'New Event toolbar button height ≥ 44px (Rule 1 desktop parity)', + ).toBeGreaterThanOrEqual(44); }); }); @@ -142,7 +158,10 @@ test.describe('Rule 1/3/4 — BottomTabBar on /lists', () => { }); test('BottomTabBar is fully in-viewport on /lists (Rule 3)', async ({ page }, testInfo) => { - test.skip(testInfo.project.name === 'desktop', 'On desktop the Main navigation landmark resolves to the DesktopNav sidebar; the safe-area-inset bottom-edge assertion is semantically wrong for a sidebar (BottomTabBar returns null at ≥768px)'); + test.skip( + testInfo.project.name === 'desktop', + 'On desktop the Main navigation landmark resolves to the DesktopNav sidebar; the safe-area-inset bottom-edge assertion is semantically wrong for a sidebar (BottomTabBar returns null at ≥768px)', + ); const nav = page.getByRole('navigation', { name: 'Main navigation' }); await expect(nav).toBeVisible(); const box = await nav.boundingBox();