diff --git a/tests/ui/stories.spec.js b/tests/ui/stories.spec.js index 20e1ebe..be098be 100644 --- a/tests/ui/stories.spec.js +++ b/tests/ui/stories.spec.js @@ -73,3 +73,15 @@ test('S6: Japan story renders hero image without placeholder', async ({ page }) 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 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)); + await page.waitForTimeout(300); + const bodyBack = page.locator('.story-footer .back-pill'); + await expect(bodyBack).toBeAttached(); + await expect(bodyBack).toHaveText(/← Back/); +}); diff --git a/user b/user index 3edc18f..26182ec 160000 --- a/user +++ b/user @@ -1 +1 @@ -Subproject commit 3edc18fe2865a8531ecad83446a075c6e296c010 +Subproject commit 26182ec363e25170029ef4d6454564d4585c9cf2