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:
+10
-11
@@ -3,14 +3,14 @@
|
||||
const { test, expect } = require('@playwright/test');
|
||||
|
||||
// Known fixture entries that always exist in the repo
|
||||
const KNOWN_SLUG = '2026-03-25-1540-wheels-down-narita.entry';
|
||||
const KNOWN_TITLE = 'Wheels Down at Narita';
|
||||
const KNOWN_CITY = 'Tokyo';
|
||||
const KNOWN_COUNTRY = 'Japan';
|
||||
const KNOWN_SLUG = '2026-06-17.entry';
|
||||
const KNOWN_TITLE = 'The Journey Begins';
|
||||
const KNOWN_CITY = 'Amsterdam';
|
||||
const KNOWN_COUNTRY = 'Netherlands';
|
||||
|
||||
// Use two fixture entries with different dates to verify descending order
|
||||
const NEWER_SLUG = '2026-04-01-0900-seoul-calling.entry'; // newer fixture
|
||||
const OLDER_SLUG = '2026-03-25-1540-wheels-down-narita.entry'; // older fixture
|
||||
// Use two real entries from central-asia-2023 to verify descending order
|
||||
const NEWER_SLUG = '2023-10-18-pixelfed-22.entry'; // newest date in that trip
|
||||
const OLDER_SLUG = '2023-08-28-pixelfed-1.entry'; // oldest date in that trip
|
||||
|
||||
// ── T1: Dailies page loads ─────────────────────────────────────────────────────
|
||||
test('T1: /trips/japan-korea-2026/dailies loads and shows at least one entry card', async ({ page }) => {
|
||||
@@ -20,10 +20,9 @@ test('T1: /trips/japan-korea-2026/dailies loads and shows at least one entry car
|
||||
});
|
||||
|
||||
// ── T2: Entries are newest-first ──────────────────────────────────────────────
|
||||
// Verify using two known fixture entries rather than all entries
|
||||
// (the dailies may contain noisy test-run debris with inconsistent dates).
|
||||
// Verify using two known real entries from central-asia-2023 (22 entries, stable order).
|
||||
test('T2: dailies shows newer entries before older entries', async ({ page }) => {
|
||||
await page.goto('/trips/japan-korea-2026/dailies');
|
||||
await page.goto('/trips/central-asia-2023/dailies');
|
||||
|
||||
// Use attribute selector to handle dots in slug names (CSS dots are class selectors)
|
||||
const newerCard = page.locator(`.journal-post[id="entry-${NEWER_SLUG}"]`);
|
||||
@@ -67,7 +66,7 @@ test('T5: entry page shows city and country when set', async ({ page }) => {
|
||||
|
||||
// ── T6: Entry page has a fixed top back pill and a footer back pill ───────────────
|
||||
test('T6: entry page has fixed back pill at top and back pill in footer', async ({ page }) => {
|
||||
const KNOWN_ENTRY = '/trips/japan-korea-2026/dailies/2026-03-25-1540-wheels-down-narita.entry';
|
||||
const KNOWN_ENTRY = '/trips/japan-korea-2026/dailies/2026-06-17.entry';
|
||||
await page.goto(KNOWN_ENTRY);
|
||||
await expect(page.locator('article.entry')).toBeVisible();
|
||||
// Fixed top pill (outside the article, before it)
|
||||
|
||||
Reference in New Issue
Block a user