From 1b4ff3cf93c63d0c08770cd7e16c320420f01012 Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Mon, 15 Jun 2026 09:30:55 -0400 Subject: [PATCH] test(18): scope timezone e2e to desktop profile (fix harness cross-profile leak) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The timezone spec mutates the single household_timezone row, but e2e global-setup resets it only once per run. Running on all three device profiles (iphone/pixel/ desktop) let one profile's "Save persists" write leak into another profile's first-run assertions, failing the harness job in CI (workers=1, serial). The admin timezone UI is desktop-focused, so skip the spec on non-desktop profiles — matching the layout.spec.ts desktop-only pattern. Full harness: 107 passed, 19 skipped. Co-Authored-By: Claude Opus 4.8 (1M context) --- apps/pwa/e2e/timezone-verify.spec.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/pwa/e2e/timezone-verify.spec.ts b/apps/pwa/e2e/timezone-verify.spec.ts index 31e2df2..8fca3be 100644 --- a/apps/pwa/e2e/timezone-verify.spec.ts +++ b/apps/pwa/e2e/timezone-verify.spec.ts @@ -12,7 +12,12 @@ import { test, expect } from '@playwright/test'; test.describe('Admin Timezone section — 18-04 round-trip', () => { - test.beforeEach(async ({ page }) => { + test.beforeEach(async ({ page }, testInfo) => { + // Desktop-only: the admin timezone UI is desktop-focused, and these tests mutate + // the single household_timezone row. global-setup resets that row once per run, so + // running on multiple profiles lets one project's save leak into another project's + // first-run assertions. Restricting to one project keeps the shared state coherent. + test.skip(testInfo.project.name !== 'desktop', 'Admin timezone UI is desktop-only'); await page.goto('/admin'); await expect(page.getByRole('heading', { name: 'Admin Settings' })).toBeVisible(); // Wait for the Timezone section to load (requires the 18-02 GET endpoint)