Add e2e coverage for goal tree checklist lines
All checks were successful
Deploy Sokko G / deploy (push) Successful in 15s

This commit is contained in:
Shinuwa 2026-08-24 21:46:04 +02:00
parent 008bb78ac7
commit 2c07545a8a

View file

@ -68,6 +68,32 @@ test("creates, edits and deletes a weekly calendar event", async ({ page }) => {
await expect(calendar.getByRole("button", { name: /Raid E2E modifié/ })).toHaveCount(0); await expect(calendar.getByRole("button", { name: /Raid E2E modifié/ })).toHaveCount(0);
}); });
test("creates a goal tree checklist with more than three visible lines", async ({ page }) => {
await createToolbox(page, "Goal Tree E2E Toolbox");
await addTool(page, "Arbre d'objectifs");
const goalTree = page.locator("[data-module-type='goalTree']");
await expect(goalTree).toBeVisible();
await goalTree.getByRole("button", { name: /Afficher l'ajout de Arbre d'objectifs/ }).click();
await goalTree.getByRole("button", { name: "Ajouter un objectif a la racine" }).click();
const editor = goalTree.getByRole("region", { name: "Édition de l'arbre d'objectifs" });
await expect(editor).toBeVisible();
await editor.getByLabel("Titre de l'objectif").fill("Farm E2E");
await editor.getByLabel("Type de l'objectif").selectOption("checklist");
await editor.getByRole("tab", { name: "Contenu" }).click();
for (const index of [1, 2, 3, 4, 5]) {
await editor.getByRole("button", { name: "Ajouter une ligne" }).click();
await editor.getByLabel("Libellé").nth(index - 1).fill(`Objectif ligne ${index}`);
}
const previewRows = goalTree.locator(".goal-tree-node-content-row");
await expect(previewRows).toHaveCount(5);
await expect(previewRows.filter({ hasText: "Objectif ligne 1" })).toBeVisible();
await expect(previewRows.filter({ hasText: "Objectif ligne 5" })).toBeVisible();
});
test("creates a game-linked toolbox from the drawer", async ({ page }) => { test("creates a game-linked toolbox from the drawer", async ({ page }) => {
await page.goto("/#/games/mhwilds"); await page.goto("/#/games/mhwilds");
await expect(page.getByRole("heading", { name: /Monster Hunter.*Wilds/ })).toBeVisible(); await expect(page.getByRole("heading", { name: /Monster Hunter.*Wilds/ })).toBeVisible();