From 32bab42e5acdbf081fca1e8081bdabcb70482e6b Mon Sep 17 00:00:00 2001 From: Stephanie Hobson Date: Wed, 18 Nov 2026 10:24:16 -0700 Subject: [PATCH] Skip the not-found footer checks against a deployed site On a deployed site, unknown paths get Cloud Storage's XML 404 rather than the app, so there is no footer to measure, and the stage smoke test failed on them after #509 merged. They still run against the dev server, which serves the app's Not Found page. --- tests/playwright/specs/footer.spec.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/playwright/specs/footer.spec.js b/tests/playwright/specs/footer.spec.js index 080eb8d..b7baf10 100644 --- a/tests/playwright/specs/footer.spec.js +++ b/tests/playwright/specs/footer.spec.js @@ -6,11 +6,17 @@ test('Footer appears', async ({ page }) => { await expect(page.locator('footer')).toBeVisible(); }); +const notFoundPaths = ['/this-page-does-not-exist', '/dashboard/not-a-dashboard']; + // The 375px window is tall enough to fit the header, the page, and the footer, // which on a phone is taller than many phone screens. for (const [width, height] of [[1280, 900], [375, 1000]]) { - for (const path of ['/contact', '/this-page-does-not-exist', '/dashboard/not-a-dashboard']) { + for (const path of ['/contact', ...notFoundPaths]) { test(`On a page shorter than the window, the footer sits at the bottom of the window (${path} at ${width}×${height})`, async ({ page }) => { + test.skip( + notFoundPaths.includes(path) && Boolean(process.env.PLAYWRIGHT_BASE_URL), + 'A deployed site answers unknown paths with Cloud Storage\'s own 404, not the app' + ); await page.setViewportSize({ width, height }); await page.goto(path); const footer = page.locator('footer');