File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ describe("Todo List Page", () => {
106106 // Find the delete button for the first todo (Learn TWD)
107107 // Since there are multiple delete buttons, we'll get all and use the first one
108108 // which corresponds to the first todo item
109- const deleteButtons = await screenDom . getAllByRole ( "button" , { name : "Delete" } ) ;
110- const deleteButton = deleteButtons [ 0 ] ;
109+ const deleteButtons = await screenDom . findAllByRole ( "button" , { name : "Delete" } ) ;
110+ const deleteButton = deleteButtons [ 0 ] as HTMLElement ;
111111
112112 await twd . mockRequest ( "getTodoList" , {
113113 method : "GET" ,
@@ -120,8 +120,8 @@ describe("Todo List Page", () => {
120120 await twd . waitForRequest ( "deleteTodo" ) ;
121121 await twd . waitForRequest ( "getTodoList" ) ;
122122
123- const todoList = await screenDom . getAllByText ( / L e a r n T W D | B u i l d T o d o A p p / ) ;
123+ const todoList = await screenDom . findAllByText ( / L e a r n T W D | B u i l d T o d o A p p / ) ;
124124 expect ( todoList ) . to . have . length ( 1 ) ;
125- twd . should ( todoList [ 0 ] , "be.visible" ) ;
125+ twd . should ( todoList [ 0 ] as HTMLElement , "be.visible" ) ;
126126 } ) ;
127- } ) ;
127+ } ) ;
You can’t perform that action at this time.
0 commit comments