fix: update tests for demo reorganisation (italy-2026-demo, central-asia ordering, japan real entry)
- dailies T2: switch ordering test to central-asia-2023 (pixelfed-1 oldest, pixelfed-22 newest) - dailies T3-T6: update KNOWN_SLUG/TITLE/CITY/COUNTRY to the real japan entry (2026-06-17) - stories S1-S7: update all italy-2025 URLs to italy-2026-demo - stories S5/S6: fix URL regex and use val-dorcia-dawn for hero sanity check - maps M5/M6: point Italy GPX map tests to italy-2026-demo (has markers + GPX) - global-setup: run make demo-load before tests so italy-2026-demo always exists - post P2: add retries:1 + test.setTimeout(60s) for intermittent FilePond upload - user: story template hero fallback for media.types config override (see user commit) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
// Requires demo data: run `make demo-load` before this suite.
|
||||
const { test, expect } = require('@playwright/test');
|
||||
|
||||
const STORIES_URL = '/trips/italy-2025/stories';
|
||||
const STORY_GALLERY = '/trips/italy-2025/stories/val-dorcia-dawn'; // gallery-led: snap-gallery × 2, chapter-break, text-only pull-quote
|
||||
const STORY_SCROLLY = '/trips/italy-2025/stories/long-climb-montalcino'; // scrolly-led: scrolly-section × 2, chapter-break, pull-quote with image
|
||||
const JAPAN_STORY = '/trips/japan-korea-2026/stories/the-thousand-gates';
|
||||
const STORIES_URL = '/trips/italy-2026-demo/stories';
|
||||
const STORY_GALLERY = '/trips/italy-2026-demo/stories/val-dorcia-dawn'; // gallery-led: snap-gallery × 2, chapter-break, text-only pull-quote
|
||||
const STORY_SCROLLY = '/trips/italy-2026-demo/stories/long-climb-montalcino'; // scrolly-led: scrolly-section × 2, chapter-break, pull-quote with image
|
||||
const DEMO_STORY = '/trips/italy-2026-demo/stories/val-dorcia-dawn'; // used for cross-trip hero sanity check
|
||||
|
||||
// ── S1: Stories listing shows cards ──────────────────────────────────────────
|
||||
test('S1: stories listing renders at least 3 story cards', async ({ page }) => {
|
||||
@@ -63,20 +63,20 @@ test('S5: back button navigates back to stories listing', async ({ page }) => {
|
||||
await expect(page.locator('.story-hero__img')).toBeVisible({ timeout: 8000 });
|
||||
await page.locator('.story-escape').click();
|
||||
// After history.back(), URL should be the stories listing
|
||||
await expect(page).toHaveURL(/italy-2025\/stories$/);
|
||||
await expect(page).toHaveURL(/italy-2026-demo\/stories$/);
|
||||
await expect(page.locator('.story-card').first()).toBeVisible();
|
||||
});
|
||||
|
||||
// ── S6: Japan story — cross-trip hero image sanity check ─────────────────────
|
||||
test('S6: Japan story renders hero image without placeholder', async ({ page }) => {
|
||||
await page.goto(JAPAN_STORY);
|
||||
// ── S6: Demo story — hero image sanity check ─────────────────────────────────
|
||||
test('S6: demo story renders hero image without placeholder', async ({ page }) => {
|
||||
await page.goto(DEMO_STORY);
|
||||
await expect(page.locator('.story-hero__img')).toBeVisible({ timeout: 8000 });
|
||||
await expect(page.locator('.story-hero__img-placeholder')).toHaveCount(0);
|
||||
});
|
||||
|
||||
// ── S7: Story body back link is styled as a back-pill ────────────────────────
|
||||
test('S7: story body back link has back-pill class', async ({ page }) => {
|
||||
await page.goto('/trips/italy-2025/stories/val-dorcia-dawn');
|
||||
await page.goto('/trips/italy-2026-demo/stories/val-dorcia-dawn');
|
||||
await expect(page.locator('.story-hero__img')).toBeVisible({ timeout: 8000 });
|
||||
// Scroll past the hero to reveal the story body
|
||||
await page.evaluate(() => window.scrollBy(0, window.innerHeight * 1.5));
|
||||
|
||||
Reference in New Issue
Block a user