import { expect, test } from '@playwright/test'; import { DOC, signIn } from './helpers'; test('M1 — mobile : logo dans la barre, menu en tiroir, actions visibles, panneau en feuille', async ({ page }) => { await signIn(page, 'Chiara'); await page.goto('/'); const brand = page.locator('header.topbar a.brand'); await expect(brand).toHaveAccessibleName('libreDecision'); await expect(brand.locator('svg')).toBeVisible(); await expect(page.locator('a.root')).toContainText('Monnaie libre'); await page.goto(DOC); await page.getByRole('button', { name: 'Menu' }).click(); const drawer = page.getByRole('dialog', { name: 'Boîte à outils' }); await expect(drawer.locator('.tool', { hasText: 'Protocoles' })).toBeVisible(); await expect(drawer.locator('.tool', { hasText: 'Docs de référence' }).locator('.count')).toHaveText('1'); await expect(drawer.getByRole('radiogroup', { name: 'Ambiance' }).getByRole('radio')).toHaveCount(4); await drawer.getByRole('button', { name: 'Fermer' }).first().click(); const first = page.locator('section.text article.unit').first(); await first.getByRole('button', { name: 'Le vote' }).click(); await expect(page.locator('aside.panel').getByText('Seuil : 50 voix pour')).toBeVisible(); });