Lay the card sheet stats out two by two when the summary is narrow, not when the window is
At 768 px the sheet switches to two columns and the summary shrinks to 336 px, so four stat tiles overflowed. A container query on the summary now decides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ccbed6cba8
commit
0807c18371
3 changed files with 11 additions and 2 deletions
|
|
@ -2511,6 +2511,12 @@ test("an administrator opens expeditions and a player leaves alone, follows the
|
|||
await expect(summary.locator(".nebula-card-summary-power strong")).toHaveText("70");
|
||||
await expect(summary.getByRole("progressbar", { name: "Expérience", exact: true })).toHaveAttribute("aria-valuenow", "10");
|
||||
await expect(summary.getByRole("list", { name: "Stats", exact: true }).getByRole("listitem")).toHaveCount(4);
|
||||
// En demi-écran, la fiche passe sur deux colonnes : les stats se rangent en 2 × 2 plutôt que de déborder.
|
||||
const statsOverflow = () => summary.locator(".nebula-card-summary-stats li").evaluateAll((items) => items.filter((item) => item.scrollWidth > item.clientWidth + 1).length);
|
||||
await partner.setViewportSize({ width: 768, height: 900 });
|
||||
await expect.poll(statsOverflow).toBe(0);
|
||||
await partner.setViewportSize({ width: 1280, height: 900 });
|
||||
await expect.poll(statsOverflow).toBe(0);
|
||||
await expect(sheet.getByRole("region", { name: "Améliorer", exact: true }).getByRole("button", { name: /^Améliorer · 70 Éclats$/ })).toBeVisible();
|
||||
await expect(sheet.getByRole("heading", { name: "Équipements", exact: true })).toHaveCount(0);
|
||||
// Les Éclats et les doublons libres se lisent sous la carte, seulement dans « Amélioration ».
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue