Offer the destination items under Sokko TCG's destinations of the day
- Each owned item that would add a destination today (guide star, sky chart, or enough treasure map fragments) gets a dashed frame under the destinations: what it does, the difficulty and the loot bonus of the added destination. A click uses the item, as in the bag. - Frames appear only while the item is owned in sufficient number and its slot is still free, and share the destinations' grid. - "1 destinations débloquées" becomes singular. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
bffbe36cbe
commit
9d2c561fc6
10 changed files with 94 additions and 6 deletions
|
|
@ -2381,10 +2381,22 @@ test("an administrator opens expeditions and a player leaves alone, follows the
|
|||
const groupDatabase = new DatabaseSync(groupDatabasePath);
|
||||
groupDatabase.prepare(`INSERT INTO collection_cards(player_id, edition_id, quantity, acquired_at) SELECT id, 'crimson-moon-kitsune-standard', 1, 0 FROM players WHERE discord_id = 'dev-admin'
|
||||
ON CONFLICT(player_id, edition_id) DO NOTHING`).run();
|
||||
groupDatabase.prepare("INSERT INTO player_items(player_id, item_id, quantity) SELECT id, 'guideStar', 1 FROM players WHERE discord_id = 'dev-admin'").run();
|
||||
groupDatabase.close();
|
||||
await page.goto("/#/cards/expeditions");
|
||||
// Première visite de ce joueur : la Guilde lui offre d'abord sa carte de destination de départ.
|
||||
await page.getByRole("dialog").getByRole("button", { name: "Préparer mon expédition", exact: true }).click();
|
||||
// Une Étoile guide dans le Sac : un cadre pointillé sous les destinations propose de l'utiliser ; un clic ajoute la destination.
|
||||
const offers = page.getByRole("list", { name: "Destinations à ajouter avec vos objets", exact: true });
|
||||
const guideStarOffer = offers.getByRole("button", { name: /^Utiliser une Étoile guide pour ajouter une destination/ });
|
||||
await expect(guideStarOffer).toBeVisible();
|
||||
await expect(offers.getByRole("button")).toHaveCount(1);
|
||||
await page.locator(".nebula-expedition-step").first().screenshot({ path: join(tmpdir(), "sokkog-cards-bonus-offers.png") });
|
||||
const dailyDestinations = await page.locator(".nebula-expedition-destination").count();
|
||||
await guideStarOffer.click();
|
||||
await expect(page.getByRole("status").filter({ hasText: "Une nouvelle destination s’ajoute à votre journée." })).toBeVisible();
|
||||
await expect(page.locator(".nebula-expedition-destination")).toHaveCount(dailyDestinations + 1);
|
||||
await expect(offers).toHaveCount(0);
|
||||
const openGroups = page.getByRole("region", { name: "Rejoindre une expédition", exact: true });
|
||||
// Avant de rejoindre, les exigences sont déjà celles du groupe avec ce joueur ; elles restent sous les yeux dans le choix de la carte,
|
||||
// puis comptent la carte choisie.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue