From ab7a994d6c04ab5ea0b66009f5c401b6b9f816fa Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Thu, 15 Oct 2026 20:08:48 +0200 Subject: [PATCH] :bug: Fix libraries modal visual test (#12367) The libraries modal now opens on the "This file" tab, so the visual test timed out looking for the shared library. Open the "Libraries" tab first, as the functional test does, mock the file with the library linked, and check the "Added" label instead of the old "File library" text. AI-assisted-by: claude-opus-5-5 --- frontend/playwright/ui/visual-specs/workspace.spec.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/playwright/ui/visual-specs/workspace.spec.js b/frontend/playwright/ui/visual-specs/workspace.spec.js index bff404fdd3..f074bc20a2 100644 --- a/frontend/playwright/ui/visual-specs/workspace.spec.js +++ b/frontend/playwright/ui/visual-specs/workspace.spec.js @@ -158,10 +158,15 @@ test.describe("Assets tab", () => { await workspace.openLibrariesModal(); await expect(workspace.page).toHaveScreenshot(); + await workspace.librariesModal + .getByRole("tab", { name: "Libraries" }) + .click(); + await expect(workspace.page).toHaveScreenshot(); + + // Now the get-file call should return a library + await workspace.mockRPC(/get\-file\?/, "workspace/get-file-library.json"); await workspace.clickLibrary("Testing library 1"); - await expect( - workspace.librariesModal.getByText("File library"), - ).toBeVisible(); + await expect(workspace.librariesModal.getByText("Added")).toBeVisible(); await expect(workspace.page).toHaveScreenshot(); });