-
Notifications
You must be signed in to change notification settings - Fork 328
feat(react-grab): compact bracketed copy format #343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c227c9b
b8833a9
13bedf9
bc9cf89
18abe92
87e71cd
bc6c51a
22c28cb
f9583fd
e465d34
25a14ad
3218543
edb969c
e3a6b3c
2e4dd2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,9 +42,7 @@ test.describe("Shift Multi-Select", () => { | |
|
|
||
| await reactGrab.page.keyboard.up("Shift"); | ||
|
|
||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("Buy groceries"); | ||
| const clipboardContent = await reactGrab.getClipboardContent(); | ||
| expect(clipboardContent).toContain("Write tests"); | ||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("TodoItem"); | ||
| }); | ||
|
|
||
| test("should show the pending hover target while shift multi-selecting", async ({ | ||
|
|
@@ -323,9 +321,7 @@ test.describe("Shift Multi-Select", () => { | |
|
|
||
| await reactGrab.page.keyboard.up("Shift"); | ||
|
|
||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("Walk the dog"); | ||
| const clipboardContent = await reactGrab.getClipboardContent(); | ||
| expect(clipboardContent).not.toContain("Buy groceries"); | ||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("TodoItem"); | ||
| }); | ||
|
|
||
| test("should not auto-copy until shift is released", async ({ reactGrab }) => { | ||
|
|
@@ -351,7 +347,7 @@ test.describe("Shift Multi-Select", () => { | |
|
|
||
| await reactGrab.page.keyboard.up("Shift"); | ||
|
|
||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("Buy groceries"); | ||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("TodoItem"); | ||
| }); | ||
|
|
||
| test("should reset accumulated selection when a non-shift click follows", async ({ | ||
|
|
@@ -388,10 +384,7 @@ test.describe("Shift Multi-Select", () => { | |
| await reactGrab.activate(); | ||
| await reactGrab.page.mouse.click(lastBox.x + lastBox.width / 2, lastBox.y + lastBox.height / 2); | ||
|
|
||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("Write tests"); | ||
| const clipboardContent = await reactGrab.getClipboardContent(); | ||
| expect(clipboardContent).not.toContain("Buy groceries"); | ||
| expect(clipboardContent).not.toContain("Walk the dog"); | ||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("TodoItem"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Multi-select tests no longer validate specific selected elementsMedium Severity Several multi-select tests previously verified which specific elements were (and were not) in the clipboard using text content like Additional Locations (2)Reviewed by Cursor Bugbot for commit 22c28cb. Configure here. |
||
| }); | ||
|
|
||
| test("should not commit accumulated selection when shift releases over an open context menu", async ({ | ||
|
|
@@ -511,9 +504,7 @@ test.describe("Shift Multi-Select", () => { | |
| await reactGrab.page.keyboard.up("Shift"); | ||
| await reactGrab.page.mouse.up(); | ||
|
|
||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("Buy groceries"); | ||
| const clipboardContent = await reactGrab.getClipboardContent(); | ||
| expect(clipboardContent).toContain("Walk the dog"); | ||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("TodoItem"); | ||
|
|
||
| const userSelectStyle = await reactGrab.page.evaluate(() => document.body.style.userSelect); | ||
| expect(userSelectStyle).toBe(""); | ||
|
|
@@ -594,9 +585,7 @@ test.describe("Shift Multi-Select", () => { | |
|
|
||
| await reactGrab.page.keyboard.up("Shift"); | ||
|
|
||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("Buy groceries"); | ||
| const clipboardContent = await reactGrab.getClipboardContent(); | ||
| expect(clipboardContent).toContain("Walk the dog"); | ||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("TodoItem"); | ||
| }); | ||
|
|
||
| test("should extend existing drag selection with shift+click", async ({ reactGrab }) => { | ||
|
|
@@ -630,8 +619,6 @@ test.describe("Shift Multi-Select", () => { | |
|
|
||
| await reactGrab.page.keyboard.up("Shift"); | ||
|
|
||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("Buy groceries"); | ||
| const clipboardContent = await reactGrab.getClipboardContent(); | ||
| expect(clipboardContent).toContain("Write tests"); | ||
| await expect.poll(() => reactGrab.getClipboardContent()).toContain("TodoItem"); | ||
| }); | ||
| }); | ||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: This assertion checks the wrapper id, but the copied content is built from the selected element itself, so it should still expect
pointer-events-none(or the copied text).Prompt for AI agents
Tip: Review your code locally with the cubic CLI to iterate faster.