0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

🐛 Fix flakiness of visual workspace test (assets tab)

This commit is contained in:
Belén Albeza 2024-07-04 15:45:50 +02:00
parent 1ca751bc42
commit 3a34eb1357
2 changed files with 6 additions and 2 deletions

View file

@ -202,6 +202,7 @@ export class WorkspacePage extends BaseWebSocketPage {
async openLibrariesModal(clickOptions = {}) {
await this.sidebar.getByText("Libraries").click(clickOptions);
await expect(this.librariesModal).toBeVisible();
}
async clickLibrary(name, clickOptions = {}) {

View file

@ -91,11 +91,14 @@ test.describe("Assets tab", () => {
await workspace.goToWorkspace();
await workspace.clickAssets();
await workspace.openLibrariesModal();
await expect(workspace.page).toHaveScreenshot();
await workspace.clickLibrary("Testing library 1");
await expect(
workspace.librariesModal.getByText(
"There are no Shared Libraries available",
),
).toBeVisible();
await expect(workspace.page).toHaveScreenshot();
});