diff --git a/apps/app/e2e/shell/catalogue-integrity.spec.ts b/apps/app/e2e/shell/catalogue-integrity.spec.ts index 56810ed2..ef9a6a3f 100644 --- a/apps/app/e2e/shell/catalogue-integrity.spec.ts +++ b/apps/app/e2e/shell/catalogue-integrity.spec.ts @@ -181,6 +181,14 @@ function countsText(dict: Dict): string { return `${counted(views, 'catalogue.card.views')}, ${counted(zones, 'catalogue.card.zones')}` } +/** Board 30: « Réessayer » and « Consulter » side by side, on one row. */ +async function expectOneRow(first: Locator, second: Locator) { + const [a, b] = [await first.boundingBox(), await second.boundingBox()] + expect(a && b, 'both buttons laid out').toBeTruthy() + expect(Math.abs(a!.y - b!.y), 'same row').toBeLessThan(1) + expect(b!.x, 'side by side').toBeGreaterThanOrEqual(a!.x + a!.width) +} + async function expectAtLeast44High(target: Locator, what: string) { const box = await target.boundingBox() expect(box, `${what} box`).not.toBeNull() @@ -289,6 +297,7 @@ test.describe('catalogue card network failure (fr)', () => { consultOf(soundCard, dict, sound), '« Consulter » beside « Réessayer »', ) + await expectOneRow(retry, consultOf(soundCard, dict, sound)) await expectListLayout(page, 'the network line') await context.unroute(VERSION_RPC, lose) diff --git a/apps/app/src/components/catalogue/CardFailure.tsx b/apps/app/src/components/catalogue/CardFailure.tsx index 17cae87d..95a87fec 100644 --- a/apps/app/src/components/catalogue/CardFailure.tsx +++ b/apps/app/src/components/catalogue/CardFailure.tsx @@ -54,7 +54,9 @@ export default function CardFailure({ failed, onRetry, retryRef, children }: Car {!retrying && attempt > 0 ? text : ''} )} -