@@ -88,13 +88,12 @@ describe("WorktreeModal", () => {
8888 } ) ;
8989
9090 expect ( document . querySelector ( ".drawer-backdrop" ) ) . toBeTruthy ( ) ;
91- expect ( document . querySelector ( ".mobile-sheet" ) ) . toBeNull ( ) ;
9291 expect ( screen . getByRole ( "dialog" , { name : worktree . name } ) ) . toBeInTheDocument ( ) ;
9392 expect ( document . querySelector ( ".drawer-panel" ) ) . toBeTruthy ( ) ;
9493 expect ( document . querySelector ( ".modal-card-lg" ) ) . toBeNull ( ) ;
95- expect ( screen . getByText ( "Latest Commit" ) ) . toBeInTheDocument ( ) ;
96- expect ( screen . getByText ( "abc1234" ) ) . toBeInTheDocument ( ) ;
97- expect ( screen . getByText ( "Initial mobile sheet setup" ) ) . toBeInTheDocument ( ) ;
94+ expect ( await screen . findByText ( "Latest Commit" ) ) . toBeInTheDocument ( ) ;
95+ expect ( await screen . findByText ( "abc1234" ) ) . toBeInTheDocument ( ) ;
96+ expect ( await screen . findByText ( "Initial mobile sheet setup" ) ) . toBeInTheDocument ( ) ;
9897 expect ( screen . getByRole ( "button" , { name : "Close" } ) ) . toHaveClass ( "btn" , "btn-ghost" , "btn-sm" ) ;
9998 } ) ;
10099
@@ -145,7 +144,7 @@ describe("WorktreeModal", () => {
145144 expect ( screen . getByRole ( "tablist" , { name : "Worktree" } ) ) . toBeInTheDocument ( ) ;
146145 expect ( screen . getByRole ( "tab" , { name : "Status" } ) ) . toHaveAttribute ( "aria-selected" , "true" ) ;
147146 expect ( screen . getByRole ( "tab" , { name : "Status" } ) ) . toHaveClass ( "worktree-tab" , "active" ) ;
148- expect ( screen . getByText ( "Latest Commit" ) ) . toBeInTheDocument ( ) ;
147+ expect ( await screen . findByText ( "Latest Commit" ) ) . toBeInTheDocument ( ) ;
149148 } ) ;
150149
151150 it ( "does not render without an explicit workspace until the workspace list is ready" , ( ) => {
0 commit comments