test(trip): specs for trip one-liner, description, banner & home gating

- 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
This commit is contained in:
2026-07-06 00:02:48 +02:00
co-authored by Claude Opus 4.8
parent 0f6b1e69cd
commit 7ea90de12b
4 changed files with 404 additions and 1 deletions
+15 -1
View File
@@ -1,5 +1,5 @@
// @ts-check
// Tests: H1 — home page journal feed
// Tests: H1 — home page journal feed; AE7 — active-trip header gating
const { test, expect } = require('@playwright/test');
// ── H1: Home page renders inline journal posts ─────────────────────────────────
@@ -8,3 +8,17 @@ test('H1: home page shows at least one inline journal-post block', async ({ page
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);
});