mirror of
https://github.com/penpot/penpot.git
synced 2026-10-28 21:40:34 +00:00
🐛 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
This commit is contained in:
parent
539983db2f
commit
ab7a994d6c
@ -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();
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user