Lot U3b : C44 en trois langues (fr, en, es), rouge sur l'interface de a47aed0 — 12 cas sur 18 : à 1360 et à 1024, en tête et depuis une version, le tableau défile (fr 412 / 421, en 406 / 424, es 472 / 501 px pour 394) ; sur Pixel 7, vert dans les trois langues. Un premier correctif (en-têtes repliés, marges du bureau gardées) laissait l'espagnol à 406 px : le test le dit désormais

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yvv
2026-11-03 22:50:38 +01:00
co-authored by Claude Opus 5.5
parent c626f1aded
commit 233cc45ff8
+23 -12
View File
@@ -313,19 +313,30 @@ test('C44 — les réglages de la formule se lisent en entier : chaque colonne d
const p = screen.page; const p = screen.page;
if (screen.size) await p.setViewportSize(screen.size); if (screen.size) await p.setViewportSize(screen.size);
if (p !== page) await signIn(p, 'Chiara'); 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). // From the head of the document (the usual turnout), then from a version (« cet article » in its
for (const from of ['tete', 'version']) { // row); in each language, whose headers are longer in Spanish (« Proporción exigida », « Votos a favor »).
await p.goto(from === 'tete' ? `${DOC}?onglet=reglages` : `${DOC}?onglet=reglages&version=${version}`); for (const [lang, last, current] of [
const panel = p.locator('aside.panel'); ['fr', 'Voix pour', 'cet article'],
await expect(panel.getByRole('heading', { name: 'Réglages de la formule' })).toBeVisible(); ['en', 'Votes for', 'this article'],
await expect(panel.locator('table tbody tr')).toHaveCount(5); ['es', 'Votos a favor', 'este artículo'],
if (from === 'version') await expect(panel.locator('tr.current th')).toContainText('cet article'); ]) {
await expect(panel.locator('thead th').last()).toHaveText('Voix pour'); for (const from of ['tete', 'version']) {
await panel.locator('table').scrollIntoViewIfNeeded(); await p.goto(from === 'tete' ? `${DOC}?onglet=reglages` : `${DOC}?onglet=reglages&version=${version}`);
// Soft: every screen is looked at, and the report names each one where the table is cut. if ((await p.evaluate(() => localStorage.getItem('ld:lang'))) !== lang) {
expect.soft(await hiddenInSettings(p), `${screen.name}, ${from === 'tete' ? 'en tête du document' : 'depuis une version'}`).toEqual([]); await p.evaluate((l) => localStorage.setItem('ld:lang', l), lang);
await shot(p, `c44-${screen.tag}-${from}`); 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(); await phone.close();
}); });