Show the automatic opening reserve as a badge on the Sokko TCG Packs menu entry
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 23m35s
Validate and deploy Sokko G / deploy (push) Successful in 16s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-30 11:30:11 +01:00
parent 8eb7f2e53e
commit bffbe36cbe
3 changed files with 8 additions and 2 deletions

View file

@ -498,3 +498,4 @@
{"id":"int-8b77d741d143c33d9ce35fae7f0bbfef","kind":"field_change","created_at":"2026-11-29T10:35:12.242344506Z","actor":"Shinuwa","issue_id":"sokko-g-xzyh","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Fait : alert-messages.js, migration 33, palico-bot dm-embeds (6ca1726). npm run check 462/462, e2e cards 15/15."}}
{"id":"int-9c1c7118c72379d11d8df977783ca7ee","kind":"field_change","created_at":"2026-11-30T09:44:37.893504439Z","actor":"Shinuwa","issue_id":"sokko-g-s0op","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"openTestGroup (devPerks) + lancement par le joueur inscrit. npm run check 463/463, e2e cards 15/15."}}
{"id":"int-46c6b71c4d8b6eb50f64f8193e91d576","kind":"field_change","created_at":"2026-11-30T10:22:30.241142524Z","actor":"Shinuwa","issue_id":"sokko-g-bsx0","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"npm run check 463/463, e2e cards 15/15."}}
{"id":"int-c432affacccf11095a7349e6a9cf1107","kind":"field_change","created_at":"2026-11-30T10:29:14.693613904Z","actor":"Shinuwa","issue_id":"sokko-g-akg7","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Pastille ajoutée (CardsPage navigationCounts.packs), test e2e mis à jour"}}

View file

@ -241,7 +241,10 @@ test("player opens and reveals a three-card pack", async ({ page }) => {
expect(await page.locator(".nebula-home-stats").evaluate((element) => element.getBoundingClientRect().bottom <= element.ownerDocument.defaultView.innerHeight + 1)).toBe(true);
await expandSections(page, "Sections de Sokko TCG");
await page.getByRole("navigation", { name: "Sections de Sokko TCG" }).getByRole("link", { name: "Paquets", exact: true }).click();
// L'entrée Paquets porte le nombre d'ouvertures de la réserve automatique, comme la Guilde ses quêtes.
const packsLink = page.getByRole("navigation", { name: "Sections de Sokko TCG" }).getByRole("link", { name: /^Paquets/ });
await expect(packsLink.locator(".nds-badge")).toHaveText("3");
await packsLink.click();
await expect(page.getByRole("heading", { name: "Paquets permanents", exact: true })).toBeVisible();
await expect(page.getByRole("heading", { name: "Paquets événements", exact: true })).toBeVisible();
// Les ouvertures disponibles sont sous le menu, et non plus dans le titre de la page.
@ -1662,7 +1665,7 @@ test("administrator navigates sections, manages mythic content and previews visu
// Le joueur utilise le code partagé dans l'onglet Paquets et ouvre le paquet offert.
await page.goto("/#/cards");
await expandSections(page, "Sections de Sokko TCG");
await page.getByRole("navigation", { name: "Sections de Sokko TCG" }).getByRole("link", { name: "Paquets", exact: true }).click();
await page.getByRole("navigation", { name: "Sections de Sokko TCG" }).getByRole("link", { name: /^Paquets/ }).click();
await page.getByRole("textbox", { name: "Utiliser un code" }).fill("e2e-live");
await page.getByRole("button", { name: "Utiliser le code" }).click();
await expect(page.locator(".nebula-redeem [role=\"status\"]")).toContainText("Code utilisé, vous recevez : Carte Paquet Astral");

View file

@ -278,6 +278,8 @@ export function CardsPage({ siteContent, cardsConfig, playerSection = "", player
const openPacks = () => navigate("/cards/packs");
const navigationCounts = {
guild: pendingQuestCount(state),
// Seulement la réserve rechargée automatiquement, pas les ouvertures achetées.
packs: state.recharge.openingsBalance,
transfers: state.transfers.filter((transfer) => transfer.status === "open" && transfer.direction === "received").length
};
const startTransfer = (type, editionId) => {