/** * CL-series — Fase 17.4.2 (changelog modal on /settings). * * CL-01: clicking "Ver historial" in the About section opens the modal * and the [v0.0.0-beta] heading is visible. * CL-02: Escape closes the modal. * * The CHANGELOG content is bundled at build time via ?raw, so these * assertions exercise the production load path (no fetch, no SSR). */ import { test, expect } from '@playwright/test'; import { USERS } from '../fixtures/users.js'; import { loginAs } from '../fixtures/login.js'; test.describe('Changelog modal', () => { test('CL-01: opens from /settings About section and shows beta heading', async ({ page }) => { await loginAs(page, USERS.ana); await page.goto('/settings'); const trigger = page.getByTestId('settings-about-view-changelog'); await expect(trigger).toBeVisible({ timeout: 10_000 }); await trigger.click(); const modal = page.getByTestId('changelog-modal'); await expect(modal).toBeVisible({ timeout: 5_000 }); // The CHANGELOG header is parsed into an

Changelog

// inside the body — the beta release heading is an

with the // literal string "[v0.0.0-beta] — 2026-05-19 — MVP + MVP2 (Fases 0–16)". const body = page.getByTestId('changelog-modal-body'); await expect(body.getByRole('heading', { level: 1, name: 'Changelog' })).toBeVisible(); await expect(body.getByText(/v0\.0\.0-beta/)).toBeVisible(); }); test('CL-02: Escape closes the modal', async ({ page }) => { await loginAs(page, USERS.ana); await page.goto('/settings'); await page.getByTestId('settings-about-view-changelog').click(); const modal = page.getByTestId('changelog-modal'); await expect(modal).toBeVisible({ timeout: 5_000 }); await page.keyboard.press('Escape'); await expect(modal).toHaveCount(0, { timeout: 5_000 }); }); });