0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00
penpot/frontend/playwright/ui/specs/workspace.spec.js

27 lines
909 B
JavaScript
Raw Normal View History

2024-05-07 06:12:58 -05:00
import { test, expect } from "@playwright/test";
import { WorkspacePage } from "../pages/WorkspacePage";
2024-05-07 06:12:58 -05:00
import { presenceFixture } from "../../data/workspace/ws-notifications";
test.beforeEach(async ({ page }) => {
await WorkspacePage.init(page);
2024-05-07 06:12:58 -05:00
});
test("User loads worskpace with empty file", async ({ page }) => {
const workspacePage = new WorkspacePage(page);
await workspacePage.setupEmptyFile(page);
2024-05-07 06:12:58 -05:00
await workspacePage.goToWorkspace();
2024-05-07 06:12:58 -05:00
await expect(workspacePage.pageName).toHaveText("Page 1");
2024-05-07 06:12:58 -05:00
});
test("User receives presence notifications updates in the workspace", async ({ page }) => {
const workspacePage = new WorkspacePage(page);
await workspacePage.setupEmptyFile();
await workspacePage.goToWorkspace();
await workspacePage.sendPresenceMessage(presenceFixture);
2024-05-07 06:12:58 -05:00
await expect(page.getByTestId("active-users-list").getByAltText("Princesa Leia")).toHaveCount(2);
});