penpot/frontend/playwright/ui/specs/workspace-comments.spec.js
Eva Marco a2abaea637
♻️ Update button-icon with tooltip component (#6539)
* 🐛 Add tooltip to base icon button

* 🎉 Update id prop

* 🐛 Fix test
2025-06-05 10:18:56 +02:00

37 lines
1.2 KiB
JavaScript

import { test, expect } from "@playwright/test";
import { WorkspacePage } from "../pages/WorkspacePage";
test.beforeEach(async ({ page }) => {
await WorkspacePage.init(page);
});
test("Group bubbles when zooming out if they overlap", async ({ page }) => {
const workspacePage = new WorkspacePage(page);
await workspacePage.setupEmptyFile();
await workspacePage.setupFileWithComments();
await workspacePage.goToWorkspace();
await workspacePage.showComments();
await expect(page.getByTestId("floating-thread-bubble-1")).toBeVisible();
await expect(page.getByTestId("floating-thread-bubble-2")).toBeVisible();
await expect(page.getByTestId("floating-thread-bubble-1-2")).toBeHidden();
const zoom = page.getByTitle("Zoom");
await zoom.click();
const zoomOut = page.getByRole("button", { name: "Zoom out" });
await zoomOut.click();
await zoomOut.click();
await zoomOut.click();
await zoomOut.click();
await expect(page.getByTestId("floating-thread-bubble-1")).toBeHidden();
await expect(page.getByTestId("floating-thread-bubble-2")).toBeHidden();
await expect(page.getByTestId("floating-thread-bubble-1-2")).toBeVisible();
await expect(page.getByTestId("floating-thread-bubble-1-2")).toHaveClass(
/unread/,
);
});