From a923c923c9682016ee262c58147306411d13ef97 Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Thu, 18 Jun 2026 15:41:53 -0400 Subject: [PATCH] test(17): open Settings tab before asserting Timezone region in e2e Phase 17 D-10 reworked /admin into a two-tab layout; the Timezone section moved into the (initially hidden) Settings tab panel. timezone-verify.spec.ts predates that rework and asserted the region visible on bare /admin, so all 7 tests timed out in the harness. Click the Settings tab in beforeEach and after the persist-test reload. Product behavior is correct; the spec was stale. Co-Authored-By: Claude Opus 4.8 (1M context) --- apps/pwa/e2e/timezone-verify.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/pwa/e2e/timezone-verify.spec.ts b/apps/pwa/e2e/timezone-verify.spec.ts index 8fca3be..a584089 100644 --- a/apps/pwa/e2e/timezone-verify.spec.ts +++ b/apps/pwa/e2e/timezone-verify.spec.ts @@ -20,6 +20,10 @@ test.describe('Admin Timezone section — 18-04 round-trip', () => { 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(); + // Phase 17 (D-10) reworked /admin into a two-tab layout; the Timezone section + // now lives in the "Settings" tab panel, which is hidden until selected. Open + // it before asserting the section. + await page.getByRole('tab', { name: 'Settings' }).click(); // Wait for the Timezone section to load (requires the 18-02 GET endpoint) const tzSection = page.getByRole('region', { name: 'Timezone' }); await expect(tzSection).toBeVisible({ timeout: 15_000 }); @@ -98,6 +102,8 @@ test.describe('Admin Timezone section — 18-04 round-trip', () => { // Reload and verify persistence await page.reload(); await expect(page.getByRole('heading', { name: 'Admin Settings' })).toBeVisible(); + // Reload resets to the default "Members & Accounts" tab — re-open Settings. + await page.getByRole('tab', { name: 'Settings' }).click(); await expect(tzSection).toBeVisible({ timeout: 15_000 }); const inputAfterReload = page.getByRole('combobox', { name: 'Household timezone' }); await expect(inputAfterReload).toHaveValue('America/Chicago');