From 602486a1d771e1161e64c2b19c39f47654d253a1 Mon Sep 17 00:00:00 2001 From: Shinuwa Date: Mon, 24 Aug 2026 21:48:51 +0200 Subject: [PATCH] Verify imported toolbox content in e2e --- e2e/toolbox.spec.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/e2e/toolbox.spec.js b/e2e/toolbox.spec.js index d66ea83..2402a43 100644 --- a/e2e/toolbox.spec.js +++ b/e2e/toolbox.spec.js @@ -115,7 +115,16 @@ test("imports and exports a toolbox payload", async ({ page }) => { await page.goto("/#/toolboxes"); await expect(page.getByRole("main")).toBeVisible(); await page.getByText("Importer une toolbox").locator("input[type='file']").setInputFiles(fixturePath); - await expect(page.getByRole("link", { name: "Ouvrir Fixture Toolbox" }).first()).toBeVisible(); + const importedToolboxLink = page.getByRole("link", { name: "Ouvrir Fixture Toolbox" }).first(); + await expect(importedToolboxLink).toBeVisible(); + await importedToolboxLink.click(); + + await expect(page.getByRole("heading", { name: "Fixture Toolbox" })).toBeVisible(); + const importedNotepad = page.locator("[data-module-type='notepad']"); + await expect(importedNotepad).toBeVisible(); + await expect(importedNotepad.getByRole("heading", { name: "Fixture Notes" })).toBeVisible(); + await expect(importedNotepad.getByText("Imported fixture note")).toBeVisible(); + await page.goto("/#/toolboxes"); const downloadPromise = page.waitForEvent("download"); await page.getByRole("button", { name: "Exporter Fixture Toolbox" }).click();