2024-11-15 17:47:28 +01:00
|
|
|
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);
|
|
|
|
|
|
|
|
const workspacePage = new WorkspacePage(page);
|
|
|
|
await workspacePage.setupEmptyFile(page);
|
2024-12-03 18:23:41 +01:00
|
|
|
await WorkspacePage.mockRPC(page, "get-teams", "get-teams-role-viewer.json");
|
2024-11-15 17:47:28 +01:00
|
|
|
|
|
|
|
await workspacePage.goToWorkspace();
|
|
|
|
});
|
|
|
|
|
|
|
|
test("User haven't toolbar", async ({ page }) => {
|
|
|
|
await expect(page.getByTitle("toggle toolbar")).toBeHidden();
|
|
|
|
await expect(page.getByTitle("design")).toBeHidden();
|
|
|
|
});
|
|
|
|
|
|
|
|
test("User haven't edition menu entries", async ({ page }) => {
|
|
|
|
await page.getByTitle("main menu").click();
|
|
|
|
await page.getByText("file").last().click();
|
|
|
|
|
|
|
|
await expect(page.getByText("Add as Shared Library")).toBeHidden();
|
|
|
|
|
|
|
|
await page.getByText("edit").click();
|
|
|
|
|
|
|
|
await expect(page.getByText("Undo")).toBeHidden();
|
|
|
|
await expect(page.getByText("Redo")).toBeHidden();
|
|
|
|
});
|