// @ts-check // Tests: H1 — home page journal feed const { test, expect } = require('@playwright/test'); // ── H1: Home page renders inline journal posts ───────────────────────────────── // Only meaningful when the site is in "travelling" mode: home.html.twig gates the // active-trip feed on `config.site.travelling`. When it's false the home renders // the between-trips highlights grid instead (no journal feed), so this test would // fail misleadingly. We skip loudly with a reason rather than assert against the // wrong view — the test still runs and validates whenever travelling is on. test('H1: home page shows at least one inline journal-post block', async ({ page }) => { await page.goto('/'); const betweenTrips = await page.locator('.home-highlights-title').count(); test.skip(betweenTrips > 0, 'home is in between-trips mode (site.travelling:false); H1 requires travelling:true'); await expect(page.locator('.journal-post').first()).toBeVisible(); await expect(page.locator('.site-header')).toBeVisible(); });