test(stories): update story slugs to match new demo content
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
// Tests: S1–S6 — story mode rendering and navigation
|
// Tests: S1–S7 — story mode rendering and navigation
|
||||||
// Requires demo data: run `make demo-load` before this suite.
|
// Requires demo data: run `make demo-load` before this suite.
|
||||||
const { test, expect } = require('@playwright/test');
|
const { test, expect } = require('@playwright/test');
|
||||||
|
|
||||||
const STORIES_URL = '/trips/italy-2026-demo/stories';
|
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_GALLERY = '/trips/italy-2026-demo/stories/val-dorcia-at-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 STORY_SCROLLY = '/trips/italy-2026-demo/stories/sorano-rock-and-time'; // 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
|
const DEMO_STORY = '/trips/italy-2026-demo/stories/val-dorcia-at-dawn'; // used for cross-trip hero sanity check
|
||||||
|
|
||||||
// ── S1: Stories listing shows cards ──────────────────────────────────────────
|
// ── S1: Stories listing shows cards ──────────────────────────────────────────
|
||||||
test('S1: stories listing renders at least 3 story cards', async ({ page }) => {
|
test('S1: stories listing renders at least 3 story cards', async ({ page }) => {
|
||||||
@@ -76,7 +76,7 @@ test('S6: demo story renders hero image without placeholder', async ({ page }) =
|
|||||||
|
|
||||||
// ── S7: Story body back link is styled as a back-pill ────────────────────────
|
// ── S7: Story body back link is styled as a back-pill ────────────────────────
|
||||||
test('S7: story body back link has back-pill class', async ({ page }) => {
|
test('S7: story body back link has back-pill class', async ({ page }) => {
|
||||||
await page.goto('/trips/italy-2026-demo/stories/val-dorcia-dawn');
|
await page.goto('/trips/italy-2026-demo/stories/val-dorcia-at-dawn');
|
||||||
await expect(page.locator('.story-hero__img')).toBeVisible({ timeout: 8000 });
|
await expect(page.locator('.story-hero__img')).toBeVisible({ timeout: 8000 });
|
||||||
// Scroll past the hero to reveal the story body
|
// Scroll past the hero to reveal the story body
|
||||||
await page.evaluate(() => window.scrollBy(0, window.innerHeight * 1.5));
|
await page.evaluate(() => window.scrollBy(0, window.innerHeight * 1.5));
|
||||||
|
|||||||
Reference in New Issue
Block a user