Hide the redundant Aniimo skill heading for a single selection

The skill heading only helps tell two selected elements apart, so it now shows
for double selections alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-05 19:26:49 +01:00
parent 243465720f
commit 9a4de4a23d
3 changed files with 13 additions and 10 deletions

View file

@ -26,11 +26,7 @@ for (const width of [768, 1440]) {
await expect(defense).toHaveClass(/nds-panel/);
const group = (panel, name) => panel.getByRole("region", { name, exact: true });
const waterAttack = attack.getByRole("region", { name: /Compétence.*Eau/ });
const skillHeading = waterAttack.getByRole("heading", { level: 3, name: /Compétence.*Eau/ });
await expect(skillHeading).toHaveClass(/nds-section-heading/);
await expect(skillHeading).toHaveCSS("justify-content", "flex-start");
await expect(skillHeading).toHaveCSS("column-gap", "12px");
await expect(skillHeading.locator(".aniimo-skill-element")).toContainText("Eau");
await expect(waterAttack.locator(".aniimo-skill-heading")).toHaveCount(0);
await expect(group(waterAttack, "Efficace")).toContainText("×1,6");
await expect(group(waterAttack, "Efficace").getByRole("listitem")).toHaveText(["Feu", "Roche"]);
await expect(group(defense, "Résistant")).toContainText("×0,625");
@ -43,6 +39,12 @@ for (const width of [768, 1440]) {
await expect(ice).toHaveAttribute("aria-pressed", "true");
await expect(picker.getByRole("button", { name: "Feu", exact: true })).toBeDisabled();
const iceAttack = attack.getByRole("region", { name: /Compétence.*Glace/ });
const skillHeading = waterAttack.getByRole("heading", { level: 3, name: /Compétence.*Eau/ });
await expect(skillHeading).toHaveClass(/nds-section-heading/);
await expect(skillHeading).toHaveCSS("justify-content", "flex-start");
await expect(skillHeading).toHaveCSS("column-gap", "12px");
await expect(skillHeading.locator(".aniimo-skill-element")).toContainText("Eau");
await expect(iceAttack.locator(".aniimo-skill-heading")).toHaveCount(1);
await expect(group(waterAttack, "Efficace").getByRole("listitem")).toHaveText(["Feu", "Roche"]);
await expect(group(iceAttack, "Peu efficace")).toContainText("×0,625");
await expect(group(iceAttack, "Peu efficace").getByRole("listitem")).toHaveText(["Feu", "Roche", "Glace"]);