Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tests/playwright/specs/footer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Loading