test: switch all test fixtures from japan-korea-2026 to italy-2026-demo
- Replace all japan-korea-2026 URL references in test files - dailies.spec.js: update KNOWN_SLUG/TITLE/CITY/COUNTRY to first campiglia entry - accessibility.spec.js: update AX4 entry URL to campiglia entry - helpers.js: update TRACKER_DIR to italy-2026-demo dailies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
This commit is contained in:
@@ -23,7 +23,7 @@ test('A2: contrast tokens meet WCAG AA 4.5:1 floor', async ({ page }) => {
|
||||
});
|
||||
|
||||
// ── A3: Filter button aria-pressed + toggle aria-expanded ──────────────────────
|
||||
const TRIP_URL = '/trips/japan-korea-2026';
|
||||
const TRIP_URL = '/trips/italy-2026-demo';
|
||||
|
||||
test('A3a: All-content filter has aria-pressed="true" on load', async ({ page }) => {
|
||||
await page.goto(TRIP_URL);
|
||||
@@ -71,7 +71,7 @@ test('A3f: clicking Cycling toggle sets aria-expanded="true" then back to false'
|
||||
|
||||
// ── A4: Photo strip keyboard navigation ───────────────────────────────────────
|
||||
test('A4a: all photo strips have role=region and aria-label', async ({ page }) => {
|
||||
await page.goto('/trips/japan-korea-2026/dailies');
|
||||
await page.goto('/trips/italy-2026-demo/dailies');
|
||||
const strips = page.locator('.journal-photo-strip');
|
||||
const count = await strips.count();
|
||||
if (count === 0) return;
|
||||
@@ -82,7 +82,7 @@ test('A4a: all photo strips have role=region and aria-label', async ({ page }) =
|
||||
});
|
||||
|
||||
test('A4b: multi-slide photo strips have accessible prev/next controls', async ({ page }) => {
|
||||
await page.goto('/trips/japan-korea-2026/dailies');
|
||||
await page.goto('/trips/italy-2026-demo/dailies');
|
||||
const multiCount = await page.locator('.journal-photo-strip').evaluateAll(
|
||||
els => els.filter(el => parseInt(el.dataset.slides, 10) >= 2).length
|
||||
);
|
||||
@@ -134,7 +134,7 @@ function axeScan(id, url) {
|
||||
}
|
||||
|
||||
axeScan('AX1', '/');
|
||||
axeScan('AX2', '/trips/japan-korea-2026');
|
||||
axeScan('AX3', '/trips/japan-korea-2026/dailies');
|
||||
axeScan('AX4', '/trips/japan-korea-2026/dailies/2026-06-17.entry');
|
||||
axeScan('AX2', '/trips/italy-2026-demo');
|
||||
axeScan('AX3', '/trips/italy-2026-demo/dailies');
|
||||
axeScan('AX4', '/trips/italy-2026-demo/dailies/2026-09-01-0700-setting-off-from-campiglia.entry');
|
||||
axeScan('AX5', '/trips');
|
||||
|
||||
+11
-11
@@ -3,18 +3,18 @@
|
||||
const { test, expect } = require('@playwright/test');
|
||||
|
||||
// Known fixture entries that always exist in the repo
|
||||
const KNOWN_SLUG = '2026-06-17.entry';
|
||||
const KNOWN_TITLE = 'The Journey Begins';
|
||||
const KNOWN_CITY = 'Amsterdam';
|
||||
const KNOWN_COUNTRY = 'Netherlands';
|
||||
const KNOWN_SLUG = '2026-09-01-0700-setting-off-from-campiglia.entry';
|
||||
const KNOWN_TITLE = 'Setting Off from Campiglia';
|
||||
const KNOWN_CITY = 'Campiglia Marittima';
|
||||
const KNOWN_COUNTRY = 'Italy';
|
||||
|
||||
// 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 }) => {
|
||||
await page.goto('/trips/japan-korea-2026/dailies');
|
||||
test('T1: /trips/italy-2026-demo/dailies loads and shows at least one entry card', async ({ page }) => {
|
||||
await page.goto('/trips/italy-2026-demo/dailies');
|
||||
await expect(page.locator('.journal-post').first()).toBeVisible();
|
||||
await expect(page.locator('.site-header')).toBeVisible();
|
||||
});
|
||||
@@ -43,15 +43,15 @@ test('T2: dailies shows newer entries before older entries', async ({ page }) =>
|
||||
});
|
||||
|
||||
// ── T3: Individual entry page loads ───────────────────────────────────────────
|
||||
test('T3: individual entry page loads at /trips/japan-korea-2026/dailies/{slug}', async ({ page }) => {
|
||||
await page.goto(`/trips/japan-korea-2026/dailies/${KNOWN_SLUG}`);
|
||||
test('T3: individual entry page loads at /trips/italy-2026-demo/dailies/{slug}', async ({ page }) => {
|
||||
await page.goto(`/trips/italy-2026-demo/dailies/${KNOWN_SLUG}`);
|
||||
await expect(page.locator('article.entry')).toBeVisible();
|
||||
await expect(page.locator('.site-header')).toBeVisible();
|
||||
});
|
||||
|
||||
// ── T4: Entry page shows title, date, and content ─────────────────────────────
|
||||
test('T4: entry page shows title and body content', async ({ page }) => {
|
||||
await page.goto(`/trips/japan-korea-2026/dailies/${KNOWN_SLUG}`);
|
||||
await page.goto(`/trips/italy-2026-demo/dailies/${KNOWN_SLUG}`);
|
||||
await expect(page.locator('.entry-title')).toContainText(KNOWN_TITLE);
|
||||
await expect(page.locator('.entry-body')).not.toBeEmpty();
|
||||
await expect(page.locator('time.entry-date')).toBeVisible();
|
||||
@@ -59,14 +59,14 @@ test('T4: entry page shows title and body content', async ({ page }) => {
|
||||
|
||||
// ── T5: Entry page shows location when present ────────────────────────────────
|
||||
test('T5: entry page shows city and country when set', async ({ page }) => {
|
||||
await page.goto(`/trips/japan-korea-2026/dailies/${KNOWN_SLUG}`);
|
||||
await page.goto(`/trips/italy-2026-demo/dailies/${KNOWN_SLUG}`);
|
||||
await expect(page.locator('.entry-location')).toContainText(KNOWN_CITY);
|
||||
await expect(page.locator('.entry-location')).toContainText(KNOWN_COUNTRY);
|
||||
});
|
||||
|
||||
// ── 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-06-17.entry';
|
||||
const KNOWN_ENTRY = '/trips/italy-2026-demo/dailies/2026-09-01-0700-setting-off-from-campiglia.entry';
|
||||
await page.goto(KNOWN_ENTRY);
|
||||
await expect(page.locator('article.entry')).toBeVisible();
|
||||
// Fixed top pill (outside the article, before it)
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const TRACKER_DIR = path.join(__dirname, '../../user/pages/01.trips/japan-korea-2026/01.dailies');
|
||||
const TRACKER_DIR = path.join(__dirname, '../../user/pages/01.trips/italy-2026-demo/01.dailies');
|
||||
|
||||
/**
|
||||
* Wait for all filepond items to finish XHR upload.
|
||||
|
||||
@@ -8,14 +8,14 @@ test('M1: /map page renders MapLibre GL canvas without JS errors', async ({ page
|
||||
const errors = [];
|
||||
page.on('pageerror', e => errors.push(e.message));
|
||||
|
||||
await page.goto('/trips/japan-korea-2026/map');
|
||||
await page.goto('/trips/italy-2026-demo/map');
|
||||
await expect(page.locator('canvas.maplibregl-canvas')).toBeVisible({ timeout: 10000 });
|
||||
expect(errors, 'No JS errors on map page').toHaveLength(0);
|
||||
});
|
||||
|
||||
// ── M2: Full map page — dot markers are in the DOM ───────────────────────────
|
||||
test('M2: /map page has at least one dot marker', async ({ page }) => {
|
||||
await page.goto('/trips/japan-korea-2026/map');
|
||||
await page.goto('/trips/italy-2026-demo/map');
|
||||
await expect(page.locator('canvas.maplibregl-canvas')).toBeVisible({ timeout: 10000 });
|
||||
// Markers are added in map.on('load') — wait for first to appear in the DOM
|
||||
await expect(page.locator('.maplibregl-marker').first()).toBeVisible({ timeout: 15000 });
|
||||
@@ -28,7 +28,7 @@ test('M3: Dailies mini-map renders MapLibre GL canvas without JS errors', async
|
||||
const errors = [];
|
||||
page.on('pageerror', e => errors.push(e.message));
|
||||
|
||||
await page.goto('/trips/japan-korea-2026/dailies');
|
||||
await page.goto('/trips/italy-2026-demo/dailies');
|
||||
await expect(page.locator('#feed-map canvas.maplibregl-canvas')).toBeVisible({ timeout: 10000 });
|
||||
expect(errors, 'No JS errors on dailies page').toHaveLength(0);
|
||||
});
|
||||
@@ -81,7 +81,7 @@ test('M6: Italy map has a journey MapLibre source after GPX settles', async ({ p
|
||||
|
||||
// ── M7: Clicking a trip-page map marker adds is-highlighted to the entry card ──
|
||||
test('M7: clicking map marker briefly highlights the corresponding entry card', async ({ page }) => {
|
||||
await page.goto('/trips/japan-korea-2026');
|
||||
await page.goto('/trips/italy-2026-demo');
|
||||
// Wait for map canvas and at least one marker
|
||||
await expect(page.locator('#trip-map canvas.maplibregl-canvas')).toBeVisible({ timeout: 10000 });
|
||||
await expect(page.locator('.maplibregl-marker').first()).toBeVisible({ timeout: 15000 });
|
||||
|
||||
+10
-10
@@ -2,40 +2,40 @@
|
||||
// Tests: N1–N5 — page loads and navigation links
|
||||
const { test, expect } = require('@playwright/test');
|
||||
|
||||
// ── N1: /trips/japan-korea-2026/dailies renders ───────────────────────────────
|
||||
test('N1: /trips/japan-korea-2026/dailies page loads with site header', async ({ page }) => {
|
||||
// ── N1: /trips/italy-2026-demo/dailies renders ───────────────────────────────
|
||||
test('N1: /trips/italy-2026-demo/dailies page loads with site header', async ({ page }) => {
|
||||
const errors = [];
|
||||
page.on('pageerror', e => errors.push(e.message));
|
||||
|
||||
await page.goto('/trips/japan-korea-2026/dailies');
|
||||
await page.goto('/trips/italy-2026-demo/dailies');
|
||||
await expect(page.locator('.site-header')).toBeVisible();
|
||||
await expect(page).toHaveTitle(/Into the East/i);
|
||||
expect(errors).toHaveLength(0);
|
||||
});
|
||||
|
||||
// ── N2: /trips/japan-korea-2026/map renders without JS errors ─────────────────
|
||||
test('N2: /trips/japan-korea-2026/map page loads without JS errors', async ({ page }) => {
|
||||
// ── N2: /trips/italy-2026-demo/map renders without JS errors ─────────────────
|
||||
test('N2: /trips/italy-2026-demo/map page loads without JS errors', async ({ page }) => {
|
||||
const errors = [];
|
||||
page.on('pageerror', e => errors.push(e.message));
|
||||
|
||||
await page.goto('/trips/japan-korea-2026/map');
|
||||
await page.goto('/trips/italy-2026-demo/map');
|
||||
await expect(page.locator('.site-header')).toBeVisible();
|
||||
expect(errors).toHaveLength(0);
|
||||
});
|
||||
|
||||
// ── N3: /trips/japan-korea-2026/stats renders ─────────────────────────────────
|
||||
test('N3: /trips/japan-korea-2026/stats page loads with site header', async ({ page }) => {
|
||||
// ── N3: /trips/italy-2026-demo/stats renders ─────────────────────────────────
|
||||
test('N3: /trips/italy-2026-demo/stats page loads with site header', async ({ page }) => {
|
||||
const errors = [];
|
||||
page.on('pageerror', e => errors.push(e.message));
|
||||
|
||||
await page.goto('/trips/japan-korea-2026/stats');
|
||||
await page.goto('/trips/italy-2026-demo/stats');
|
||||
await expect(page.locator('.site-header')).toBeVisible();
|
||||
expect(errors).toHaveLength(0);
|
||||
});
|
||||
|
||||
// ── N4: trip page has Journal filter button (replaced nav link) ───────────────
|
||||
test('N4: trip page filter bar has Journal button', async ({ page }) => {
|
||||
await page.goto('/trips/japan-korea-2026');
|
||||
await page.goto('/trips/italy-2026-demo');
|
||||
await expect(page.locator('.trip-filter-btn[data-filter="journal"]')).toBeVisible();
|
||||
});
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ test('P1: post text-only entry → created on disk and visible on /dailies', asy
|
||||
const photos = fs.readdirSync(entryDir).filter(f => /\.(jpg|jpeg|png|webp|heic)$/i.test(f));
|
||||
expect(photos.length, 'Text-only entry should have no photos').toBe(0);
|
||||
|
||||
await page.goto('/trips/japan-korea-2026/dailies');
|
||||
await page.goto('/trips/italy-2026-demo/dailies');
|
||||
await expect(page.locator('body')).toContainText(tag);
|
||||
});
|
||||
|
||||
@@ -71,7 +71,7 @@ test.skip('P2: post entry with photo → photo saved in entry folder and visible
|
||||
const photos = fs.readdirSync(entryDir).filter(f => /\.(jpg|jpeg|png|webp|heic)$/i.test(f));
|
||||
expect(photos.length, 'At least one photo should be saved').toBeGreaterThan(0);
|
||||
|
||||
await page.goto('/trips/japan-korea-2026/dailies');
|
||||
await page.goto('/trips/italy-2026-demo/dailies');
|
||||
await expect(page.locator('body')).toContainText(tag);
|
||||
});
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Tests: F1–F7 — trip page filter bar and inline stats toggle
|
||||
const { test, expect } = require('@playwright/test');
|
||||
|
||||
const TRIP_URL = '/trips/japan-korea-2026';
|
||||
const TRIP_URL = '/trips/italy-2026-demo';
|
||||
|
||||
// ── F1: filter bar renders with three buttons ─────────────────────────────────
|
||||
test('F1: trip page shows All/Journal/Stories filter buttons', async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user