Allow linking an existing toolbox from the game drawer
All checks were successful
Deploy Sokko G / deploy (push) Successful in 19s

This commit is contained in:
Shinuwa 2026-10-01 09:33:18 +02:00
parent 962816bbb9
commit c3bab44a4b
7 changed files with 107 additions and 1 deletions

View file

@ -219,6 +219,29 @@ test("creates a game-linked toolbox from the drawer", async ({ page }) => {
await expect(page.getByRole("button", { name: "Masquer la toolbox", exact: true })).toBeVisible();
});
test("links an available toolbox directly from the empty game drawer", async ({ page }) => {
await createToolbox(page, "Toolbox déjà liée");
await page.goto("/#/games/mhwilds");
await page.getByRole("button", { name: "Afficher la toolbox", exact: true }).click();
const drawer = page.locator("#toolbox-drawer .drawer-panel");
await expect(drawer.getByRole("heading", { name: "Ou associer une toolbox déjà existante" })).toBeVisible();
await drawer.getByLabel("Toolbox disponible").selectOption({ label: "Toolbox déjà liée" });
await drawer.getByRole("button", { name: "Associer", exact: true }).click();
await expect(drawer.getByRole("heading", { name: "Toolbox déjà liée", exact: true })).toBeVisible();
await createToolbox(page, "Toolbox libre");
await page.goto("/#/games/diablo4");
await page.getByRole("button", { name: "Afficher la toolbox", exact: true }).click();
await expect(drawer.getByLabel("Toolbox disponible").getByRole("option", { name: "Toolbox déjà liée" })).toHaveCount(0);
await drawer.getByLabel("Toolbox disponible").selectOption({ label: "Toolbox libre" });
await drawer.getByRole("button", { name: "Associer", exact: true }).click();
await expect(drawer.getByRole("heading", { name: "Toolbox libre", exact: true })).toBeVisible();
await expect(drawer.getByRole("heading", { name: "Ou associer une toolbox déjà existante" })).toHaveCount(0);
});
test("imports and exports a toolbox payload", async ({ page }) => {
await page.goto("/#/toolboxes");
await expect(page.getByRole("main")).toBeVisible();