import { test, expect } from '@playwright/test'; test('status page renders mocked API state', async ({ page }) => { const interceptedUrls: string[] = []; await page.route('**/api/status', async route => { interceptedUrls.push(route.request().url()); await route.fulfill({ status: 200, json: { status: 'ok', message: 'Mocked by Playwright', }, }); }); await page.goto('/status'); await expect(page.getByRole('heading', { name: 'Mocked by Playwright' })).toBeVisible(); await expect(page.getByText('Status: ok')).toBeVisible(); expect(interceptedUrls).toHaveLength(1); });