Rework the Broken Mirror screens and the Guild quest board
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 23m32s
Validate and deploy Sokko G / deploy (push) Successful in 16s

The mirror page opens on two illustrated cards, Normal and Hard, painted
with Codex, with three small rule reminders; a card opens or starts its
game. The five companions of the daily team show as tiles: one click uses
a help, two per game, with no selection step. Helps are renamed after
what they do (swap anywhere, show a piece's place, double the rewards,
undo the last move, see the model again), use the shared tooltip and
keep the same height. Selecting a piece no longer waits for the server,
and showing a place aims at the selected piece. Under 960 px of
dashboard, like the section menu, the board goes on top and the moves
panel keeps only the count. Stardust is always written in full.

The Guild board shows four tiles per row on full screen, aligned with
subgrids, solo quests first. Status lines give way to a wooden "Fait"
sign on finished quests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-28 16:25:35 +01:00
parent ddb3b81278
commit 8c0771f06f
20 changed files with 337 additions and 236 deletions

View file

@ -2084,7 +2084,8 @@ test("a player finds the daily card with hints and copies the result", async ({
await expect(page.getByRole("heading", { name: "Guilde des Veilleurs", exact: true })).toBeVisible();
await expect(sections.getByRole("link", { name: /^Guilde/ })).toHaveAttribute("aria-current", "page");
const quest = page.getByRole("article", { name: "Carte du jour" });
await expect(quest).toContainText("Une nouvelle carte vous attend.");
// La tuile n'écrit pas son état : à faire, pas de pancarte et le bouton « Jouer ».
await expect(quest.locator('.nebula-quest-sign[data-kind="done"]')).toHaveCount(0);
await quest.getByRole("link", { name: "Jouer", exact: true }).click();
await expect(page).toHaveURL(/#\/cards\/daily$/);
await expect(sections.getByRole("link", { name: /^Guilde/ })).toHaveAttribute("aria-current", "page");
@ -2217,11 +2218,12 @@ test("a player finds the daily card with hints and copies the result", async ({
await page.goto("/#/cards");
await page.getByRole("navigation", { name: "Sections de Sokko TCG" }).getByRole("link", { name: "Historique", exact: true }).click();
await expect(page.locator(".nebula-history-list li").filter({ hasText: "Carte du jour trouvée" })).toContainText("· 2/6 · +10 poussières d’étoiles");
// La quête terminée n'attend plus : le bandeau l'annonce, et la tuile de la Guilde donne le résultat.
// La quête terminée n'attend plus : le bandeau l'annonce, et la tuile de la Guilde porte la pancarte « Fait ».
await page.getByRole("navigation", { name: "Sections de Sokko TCG" }).getByRole("link", { name: "Accueil", exact: true }).click();
await expect(guildBanner).toContainText("Aucune quête ne vous attend pour le moment.");
await guildBanner.getByRole("link", { name: "Accéder aux missions", exact: true }).click();
await expect(quest.locator(".nebula-quest-status")).toHaveText("Trouvée en 2/6.");
await expect(quest.locator('.nebula-quest-sign[data-kind="done"]')).toHaveText("Fait");
await expect(quest.locator(".nebula-quest-status")).toHaveCount(0);
await expect(quest.locator(".nebula-quest-media .nds-badge")).toHaveText("Série : 1 jour");
await expect(quest.getByRole("link", { name: "Voir le résultat", exact: true })).toBeVisible();
});
@ -2578,11 +2580,16 @@ test("an administrator opens the broken mirror and a player rebuilds the normal
await page.goto("/#/cards/guild");
await page.reload();
const quest = page.getByRole("article", { name: "Miroir brisé" });
await expect(quest).toContainText("Deux images vous attendent : le Normal, puis le Difficile.");
await expect(quest.getByRole("link", { name: "Jouer", exact: true })).toBeVisible();
await quest.getByRole("link", { name: "Jouer", exact: true }).click();
await expect(page).toHaveURL(/#\/cards\/mirror$/);
await expect(page.getByRole("button", { name: "Commencer le Difficile" })).toHaveCount(0);
await page.getByRole("button", { name: "Commencer le Normal", exact: true }).click();
// Deux cartes : le Normal à jouer, le Difficile verrouillé tant que le Normal n'est pas terminé.
const normalCard = page.getByRole("article", { name: "Normal", exact: true });
const hardCard = page.getByRole("article", { name: "Difficile", exact: true });
await expect(normalCard).toContainText("16 morceaux");
await expect(hardCard).toContainText("Terminez d’abord le Normal du jour.");
await expect(hardCard.getByRole("button", { name: "Jouer", exact: true })).toBeDisabled();
await normalCard.getByRole("button", { name: "Jouer", exact: true }).click();
// 16 morceaux, une image mélangée en blob ; on n'échange que dans la même rangée ou la même colonne.
const board = page.getByRole("group", { name: "Morceaux de l’illustration" });
@ -2618,13 +2625,16 @@ test("an administrator opens the broken mirror and a player rebuilds the normal
await expect(result).toContainText("Illustration :");
// Le Difficile s'ouvre ensuite : 35 morceaux, sans contour vert.
await page.getByRole("button", { name: "Passer au Difficile", exact: true }).click();
await page.getByRole("button", { name: "Commencer le Difficile", exact: true }).click();
await page.getByRole("button", { name: "Jouer le Difficile", exact: true }).click();
await expect(pieces).toHaveCount(35);
await expect(board.locator("[data-placed]")).toHaveCount(0);
await page.setViewportSize({ width: 768, height: 900 });
expect(await page.locator("html").evaluate((element) => element.scrollWidth > element.clientWidth)).toBe(false);
await page.setViewportSize({ width: 1280, height: 720 });
// « Changer de miroir » ramène aux deux cartes, avec l'état de chaque partie.
await page.getByRole("button", { name: "Changer de miroir", exact: true }).click();
await expect(normalCard).toContainText("Reconstituée");
await expect(hardCard.getByRole("button", { name: "Reprendre", exact: true })).toBeVisible();
// Le Miroir se referme pour les parcours suivants.
await page.goto("/#/cards/admin/guild/mirror");