File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
webview-ui/src/components/history/__tests__ Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -135,17 +135,22 @@ describe("HistoryView", () => {
135135 } )
136136 } )
137137
138- it ( "handles task deletion" , ( ) => {
138+ it ( "handles task deletion" , async ( ) => {
139139 const onDone = jest . fn ( )
140140 render ( < HistoryView onDone = { onDone } /> )
141141
142142 // Find and hover over first task
143143 const taskContainer = screen . getByTestId ( "virtuoso-item-1" )
144144 fireEvent . mouseEnter ( taskContainer )
145145
146+ // Click delete button to open confirmation dialog
146147 const deleteButton = within ( taskContainer ) . getByTitle ( "Delete Task" )
147148 fireEvent . click ( deleteButton )
148149
150+ // Find and click the confirm delete button in the dialog
151+ const confirmDeleteButton = screen . getByRole ( "button" , { name : / d e l e t e / i } )
152+ fireEvent . click ( confirmDeleteButton )
153+
149154 // Verify vscode message was sent
150155 expect ( vscode . postMessage ) . toHaveBeenCalledWith ( {
151156 type : "deleteTaskWithId" ,
You can’t perform that action at this time.
0 commit comments