test(trip): add AE4 no-banner coverage + record deferred review findings
- trip-header.spec.js: new U4/R9/AE4 test — a trip with no cover_image and no entry images renders its text header with no .trip-header-banner strip. - Makefile: demo-load/demo-reset now also (un)load the no-photos-demo fixture, guarded with `|| true` so runs whose user/ predates the fixture skip it instead of failing globalSetup. - plan: post-review follow-up notes the applied fixes and records the two intentionally-deferred findings (macro-owned resolution per KTD2; inline toggle script per U4's Approach) so they are not re-flagged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDS6t8wcpbwKvvrxykVQ5K
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
const { test, expect } = require('@playwright/test');
|
||||
|
||||
const TRIP_URL = '/trips/italy-2026-demo';
|
||||
const NO_PHOTOS_URL = '/trips/no-photos-demo'; // no cover_image, one image-less entry
|
||||
|
||||
const topOf = async (locator) => (await locator.boundingBox()).y;
|
||||
|
||||
@@ -65,6 +66,19 @@ test('U4/R9/AE3: banner falls back to the first journal entry image', async ({ p
|
||||
await expect(img).toHaveAttribute('alt', 'Tuscany 2026');
|
||||
});
|
||||
|
||||
// ── R9/AE4: no cover_image and no entry images → text-only header, no banner ───
|
||||
test('U4/R9/AE4: trip with no cover and no entry images renders no banner strip', async ({ page }) => {
|
||||
await page.goto(NO_PHOTOS_URL);
|
||||
// The text extras still render (the header is not blank)...
|
||||
await expect(page.locator('.home-trip-name')).toHaveText('Notes from the Road 2027');
|
||||
await expect(page.locator('.home-trip-tagline')).toBeVisible();
|
||||
// ...and there is a journal entry, so the empty-cover path is the macro's
|
||||
// fallback loop finding no image — not simply an empty trip.
|
||||
await expect(page.locator('.feed .journal-post')).toHaveCount(1);
|
||||
// With no resolvable cover, the banner strip is omitted entirely (AE4).
|
||||
await expect(page.locator('.trip-header-banner')).toHaveCount(0);
|
||||
});
|
||||
|
||||
// ── R10/AE6: the map+journal split is intact with no header above it ───────────
|
||||
test('U4/R10/AE6: map+journal split renders with the extras inside the feed column', async ({ page }) => {
|
||||
await page.goto(TRIP_URL);
|
||||
|
||||
Reference in New Issue
Block a user