From 233cc45ff86ffeababca4f188f257e7a6279e837 Mon Sep 17 00:00:00 2001 From: Yvv Date: Tue, 3 Nov 2026 22:50:38 +0100 Subject: [PATCH] =?UTF-8?q?Lot=20U3b=20:=20C44=20en=20trois=20langues=20(f?= =?UTF-8?q?r,=20en,=20es),=20rouge=20sur=20l'interface=20de=20a47aed0=20?= =?UTF-8?q?=E2=80=94=2012=20cas=20sur=2018=20:=20=C3=A0=201360=20et=20?= =?UTF-8?q?=C3=A0=201024,=20en=20t=C3=AAte=20et=20depuis=20une=20version,?= =?UTF-8?q?=20le=20tableau=20d=C3=A9file=20(fr=20412=20/=20421,=20en=20406?= =?UTF-8?q?=20/=20424,=20es=20472=20/=20501=20px=20pour=20394)=20;=20sur?= =?UTF-8?q?=20Pixel=207,=20vert=20dans=20les=20trois=20langues.=20Un=20pre?= =?UTF-8?q?mier=20correctif=20(en-t=C3=AAtes=20repli=C3=A9s,=20marges=20du?= =?UTF-8?q?=20bureau=20gard=C3=A9es)=20laissait=20l'espagnol=20=C3=A0=2040?= =?UTF-8?q?6=20px=20:=20le=20test=20le=20dit=20d=C3=A9sormais?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- web/e2e/ouverture.spec.ts | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/web/e2e/ouverture.spec.ts b/web/e2e/ouverture.spec.ts index 7831ec5..bea8b5c 100644 --- a/web/e2e/ouverture.spec.ts +++ b/web/e2e/ouverture.spec.ts @@ -313,19 +313,30 @@ test('C44 — les réglages de la formule se lisent en entier : chaque colonne d const p = screen.page; if (screen.size) await p.setViewportSize(screen.size); if (p !== page) await signIn(p, 'Chiara'); - // From the head of the document (the usual turnout), then from a version (« cet article » in its row). - for (const from of ['tete', 'version']) { - await p.goto(from === 'tete' ? `${DOC}?onglet=reglages` : `${DOC}?onglet=reglages&version=${version}`); - const panel = p.locator('aside.panel'); - await expect(panel.getByRole('heading', { name: 'Réglages de la formule' })).toBeVisible(); - await expect(panel.locator('table tbody tr')).toHaveCount(5); - if (from === 'version') await expect(panel.locator('tr.current th')).toContainText('cet article'); - await expect(panel.locator('thead th').last()).toHaveText('Voix pour'); - await panel.locator('table').scrollIntoViewIfNeeded(); - // Soft: every screen is looked at, and the report names each one where the table is cut. - expect.soft(await hiddenInSettings(p), `${screen.name}, ${from === 'tete' ? 'en tête du document' : 'depuis une version'}`).toEqual([]); - await shot(p, `c44-${screen.tag}-${from}`); + // From the head of the document (the usual turnout), then from a version (« cet article » in its + // row); in each language, whose headers are longer in Spanish (« Proporción exigida », « Votos a favor »). + for (const [lang, last, current] of [ + ['fr', 'Voix pour', 'cet article'], + ['en', 'Votes for', 'this article'], + ['es', 'Votos a favor', 'este artículo'], + ]) { + for (const from of ['tete', 'version']) { + await p.goto(from === 'tete' ? `${DOC}?onglet=reglages` : `${DOC}?onglet=reglages&version=${version}`); + if ((await p.evaluate(() => localStorage.getItem('ld:lang'))) !== lang) { + await p.evaluate((l) => localStorage.setItem('ld:lang', l), lang); + await p.reload(); + } + const panel = p.locator('aside.panel'); + await expect(panel.locator('table tbody tr')).toHaveCount(5); + if (from === 'version') await expect(panel.locator('tr.current th')).toContainText(current); + await expect(panel.locator('thead th').last()).toHaveText(last); + await panel.locator('table').scrollIntoViewIfNeeded(); + // Soft: every screen is looked at, and the report names each one where the table is cut. + expect.soft(await hiddenInSettings(p), `${screen.name}, ${lang}, ${from === 'tete' ? 'en tête du document' : 'depuis une version'}`).toEqual([]); + if (lang === 'fr') await shot(p, `c44-${screen.tag}-${from}`); + } } + await p.evaluate(() => localStorage.setItem('ld:lang', 'fr')); } await phone.close(); });