Skip to content

Commit d2ec53a

Browse files
committed
Fix test
1 parent 6412b60 commit d2ec53a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

webview-ui/src/components/history/__tests__/HistoryView.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ describe("HistoryView", () => {
106106
// Verify copy the plain text content of the task when the copy button is clicked
107107
const taskContainer = screen.getByTestId("virtuoso-item-1")
108108
fireEvent.mouseEnter(taskContainer)
109-
const copyButton = within(taskContainer).getByTitle("Copy Prompt");
110-
fireEvent.click(copyButton);
111-
const taskContent = within(taskContainer).getByTestId("task-content");
112-
expect(navigator.clipboard.writeText).toHaveBeenCalledWith(taskContent.textContent);
109+
const copyButton = within(taskContainer).getByTestId("copy-prompt-button")
110+
fireEvent.click(copyButton)
111+
const taskContent = within(taskContainer).getByTestId("task-content")
112+
expect(navigator.clipboard.writeText).toHaveBeenCalledWith(taskContent.textContent)
113113
})
114114

115115
it("handles sort options correctly", async () => {

0 commit comments

Comments
 (0)