Show the expedition's state on the Guild tile button
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 22m12s
Validate and deploy Sokko G / deploy (push) Successful in 12s

The Expeditions tile now reads "En cours" while an expedition is on its
way, "Récupérer le butin" once one has returned, and "Préparer"
otherwise. The tile also refreshes at the next return time, so the
button switches to the loot without reloading the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-19 14:11:40 +01:00
parent 2c10df0370
commit c1ef7b6ce7
6 changed files with 328 additions and 8 deletions

View file

@ -2004,11 +2004,16 @@ test("an administrator opens expeditions and a player leaves alone, follows the
await partner.setViewportSize({ width: 768, height: 900 });
expect(await partner.locator(".nebula-expeditions").evaluate((element) => element.scrollWidth - element.clientWidth)).toBe(0);
await partner.setViewportSize({ width: 1280, height: 900 });
// Dans la Guilde, le bouton de la tuile suit l'expédition : « En cours » tant qu'elle est en route.
await partner.goto("/#/cards/guild");
await expect(quest.getByRole("link")).toHaveText("En cours");
// Trois heures plus tard pour le serveur : l'expédition est revenue, son butin s'affiche sur place, sans rappel du résultat ; il se
// récupère d'un clic, qui retire la carte et confirme par un avis.
// Trois heures plus tard pour le serveur : l'expédition est revenue, la tuile mène au butin. Il s'affiche sur place, sans rappel
// du résultat, et se récupère d'un clic, qui retire la carte et confirme par un avis.
await setServerClock(3 * 3_600_000);
await partner.reload();
await quest.getByRole("link", { name: "Récupérer le butin", exact: true }).click();
await expect(partner).toHaveURL(/#\/cards\/expeditions$/);
const report = partner.locator(".nebula-expedition-return").first();
await expect(report).toContainText("De retour ! Le butin vous attend.");
await expect(report.getByRole("definition")).toHaveCount(0);