import { test, expect } from "@playwright/test"; import { WorkspacePage } from "../pages/WorkspacePage"; import { presenceFixture } from "../../data/workspace/ws-notifications"; test.beforeEach(async ({ page }) => { await WorkspacePage.init(page); }); test("User loads worskpace with empty file", async ({ page }) => { const workspacePage = new WorkspacePage(page); await workspacePage.setupEmptyFile(page); await workspacePage.goToWorkspace(); await expect(workspacePage.pageName).toHaveText("Page 1"); }); 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); await expect(page.getByTestId("active-users-list").getByAltText("Princesa Leia")).toHaveCount(2); });