mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
Merge pull request #4844 from penpot/eva-fix-visual-test
🐛 Fix workspace visual test for assets modal
This commit is contained in:
commit
b8b199c5ec
3 changed files with 12 additions and 2 deletions
|
@ -0,0 +1 @@
|
||||||
|
{}
|
|
@ -202,6 +202,7 @@ export class WorkspacePage extends BaseWebSocketPage {
|
||||||
|
|
||||||
async openLibrariesModal(clickOptions = {}) {
|
async openLibrariesModal(clickOptions = {}) {
|
||||||
await this.sidebar.getByText("Libraries").click(clickOptions);
|
await this.sidebar.getByText("Libraries").click(clickOptions);
|
||||||
|
await expect(this.librariesModal).toBeVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickLibrary(name, clickOptions = {}) {
|
async clickLibrary(name, clickOptions = {}) {
|
||||||
|
|
|
@ -83,14 +83,22 @@ test.describe("Assets tab", () => {
|
||||||
"workspace/get-team-shared-libraries-non-empty.json",
|
"workspace/get-team-shared-libraries-non-empty.json",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await workspace.mockRPC(
|
||||||
|
"push-audit-events",
|
||||||
|
"workspace/audit-event-empty.json",
|
||||||
|
);
|
||||||
|
|
||||||
await workspace.goToWorkspace();
|
await workspace.goToWorkspace();
|
||||||
await workspace.clickAssets();
|
await workspace.clickAssets();
|
||||||
await workspace.openLibrariesModal();
|
await workspace.openLibrariesModal();
|
||||||
|
|
||||||
await expect(workspace.page).toHaveScreenshot();
|
await expect(workspace.page).toHaveScreenshot();
|
||||||
|
|
||||||
await workspace.clickLibrary("Testing library 1");
|
await workspace.clickLibrary("Testing library 1");
|
||||||
|
await expect(
|
||||||
|
workspace.librariesModal.getByText(
|
||||||
|
"There are no Shared Libraries available",
|
||||||
|
),
|
||||||
|
).toBeVisible();
|
||||||
await expect(workspace.page).toHaveScreenshot();
|
await expect(workspace.page).toHaveScreenshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue