- trips-list.spec.js: one-liner presence/absence, retina srcset, cover fallback, alt text (U3). - trip-header.spec.js: HTD stacking order, expandable description, banner fallback, split intact (U4). - home.spec.js: AE7 — the gated trip-page extras never leak onto the home route (asserted mode-independently so it can't race the home-highlights suite that toggles travelling in a parallel worker). Also marks the plan complete. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDS6t8wcpbwKvvrxykVQ5K
25 lines
1.4 KiB
JavaScript
25 lines
1.4 KiB
JavaScript
// @ts-check
|
|
// Tests: H1 — home page journal feed; AE7 — active-trip header gating
|
|
const { test, expect } = require('@playwright/test');
|
|
|
|
// ── H1: Home page renders inline journal posts ─────────────────────────────────
|
|
test('H1: home page shows at least one inline journal-post block', async ({ page }) => {
|
|
await page.goto('/');
|
|
await expect(page.locator('.journal-post').first()).toBeVisible();
|
|
await expect(page.locator('.site-header')).toBeVisible();
|
|
});
|
|
|
|
// ── AE7: the trip-page header extras never leak onto the home route ────────────
|
|
// The trip-page one-liner/description/banner are gated to the trip.html.twig
|
|
// caller of the shared trip-feed-col partial (trip_header_extras, default off);
|
|
// home's include omits the flag, so its header is unchanged (R12/KTD4). Asserted
|
|
// as an absence on `/` so it holds whether home is in active-trip or
|
|
// between-trips mode — the sibling home-highlights suite toggles that mode in a
|
|
// parallel worker, so this test must not depend on it.
|
|
test('AE7: home never renders the trip-page header extras', async ({ page }) => {
|
|
await page.goto('/');
|
|
await expect(page.locator('.home-trip-tagline')).toHaveCount(0);
|
|
await expect(page.locator('.trip-header-desc')).toHaveCount(0);
|
|
await expect(page.locator('.trip-header-banner')).toHaveCount(0);
|
|
});
|