forked from yvv/decision
e2e : l'accueil sous la voûte (C1 au bureau, M1 sur téléphone à 412 puis 360) : les trois points dans l'ouverture et centrés, le titre centré en deux lignes, rien d'incliné ni de débordant
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { expect, test, type Locator } from '@playwright/test';
|
||||
import { DOC, shot, signIn } from './helpers';
|
||||
import { DOC, expectWelcome, shot, signIn } from './helpers';
|
||||
|
||||
/** WCAG contrast ratio of two CSS colours `rgb(r, g, b)`. */
|
||||
function contrast(a: string, b: string): number {
|
||||
@@ -25,13 +25,19 @@ async function backdrop(el: Locator): Promise<string> {
|
||||
});
|
||||
}
|
||||
|
||||
test('M1 — mobile : logo dans la barre, menu en tiroir, vote déplié, panier, réglages lisibles, pastilles au clavier', async ({ page }) => {
|
||||
test('M1 — mobile : logo dans la barre, l’accueil sous la voûte, menu en tiroir, vote déplié, panier, réglages lisibles, pastilles au clavier', 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');
|
||||
// The welcome on this phone, then on a narrow one (360): the arch still shelters the three points.
|
||||
await expectWelcome(page);
|
||||
const size = page.viewportSize();
|
||||
await page.setViewportSize({ width: 360, height: 780 });
|
||||
await expectWelcome(page);
|
||||
if (size) await page.setViewportSize(size);
|
||||
await page.goto(DOC);
|
||||
await page.getByRole('button', { name: 'Menu' }).click();
|
||||
const drawer = page.getByRole('dialog', { name: 'Boîte à outils' });
|
||||
|
||||
Reference in New Issue
Block a user