Skip to content

Commit fbd76bc

Browse files
committed
fix test again
1 parent 98017d0 commit fbd76bc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

webview-ui/src/components/chat/__tests__/TaskHeader.test.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ describe("TaskHeader", () => {
106106
})
107107

108108
it("should disable the condense context button when buttonsDisabled is true", () => {
109-
renderTaskHeader({ buttonsDisabled: true })
109+
const handleCondenseContext = jest.fn()
110+
renderTaskHeader({ buttonsDisabled: true, handleCondenseContext })
110111
const condenseButton = screen.getByTitle("chat:task.condenseContext")
111-
expect(condenseButton).toBeDisabled()
112+
fireEvent.click(condenseButton)
113+
expect(handleCondenseContext).not.toHaveBeenCalled()
112114
})
113115
})

0 commit comments

Comments
 (0)