mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 12:16:38 +02:00
✨ Replace overlapping bubbles with a bubble group (#6059)
This commit is contained in:
parent
0efbebd94f
commit
86022a967c
9 changed files with 299 additions and 46 deletions
37
frontend/playwright/ui/specs/workspace-comments.spec.js
Normal file
37
frontend/playwright/ui/specs/workspace-comments.spec.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
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.getByTitle("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/,
|
||||
);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue