0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -05:00
penpot/frontend/playwright/ui/specs/workspace-viewer-role.spec.js
Andrey Antukh 3e090b126e ♻️ Refactor application routing
Mainly removes an inconsistent use of path params and normalize
all routes to use query params for make it extensible without
breaking urls.
2024-12-03 18:23:41 +01:00

30 lines
1 KiB
JavaScript

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);
await WorkspacePage.mockRPC(page, "get-teams", "get-teams-role-viewer.json");
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();
});