import { expect, test } from '@playwright/test'; import { expectNoHorizontalScroll, watchErrors } from './helpers.js'; for (const path of ['/', '/neuigkeiten', '/termine', '/personen', '/ideen', '/stellen', '/profil']) { test(`Handy: ${path} ohne seitliches Scrollen`, async ({ page }) => { const errors = watchErrors(page); await page.goto(path); await expect(page.locator('h1').first()).toBeAttached(); await page.waitForLoadState('networkidle'); await expectNoHorizontalScroll(page); errors.assertNone(); }); } test('Handy: Menü öffnet sich', async ({ page }) => { await page.goto('/'); const app = (await page.locator('html').getAttribute('data-ui')) === 'app'; // Mitarbeiter-App-Oberfläche: untere Leiste, sonst Burger-Menü in der Kopfzeile await (app ? page.getByRole('button', { name: 'Mehr' }).last() : page.getByRole('button', { name: 'Menü öffnen' })).click(); await expect(page.getByRole('dialog').getByRole('navigation', { name: 'Hauptnavigation' })).toBeVisible(); });