@@ -106,12 +106,28 @@ describe('Lightpanda Git comparison', () => {
106106 '[data-git-virtual-row]' ,
107107 ( rows ) => rows . length ,
108108 ) ;
109- expect ( mountedRows ) . toBeLessThan ( 30 ) ;
109+ expect ( mountedRows ) . toBeLessThan ( 30 ) ;
110110
111- await writeFile ( join ( project , 'large.txt' ) , `${ refreshed } \n` , 'utf8' ) ;
112- await fixture . page . waitForFunction (
113- ( ) => document . body . textContent ?. includes ( 'The Working Tree changed.' ) ,
114- { timeout : 25_000 } ,
111+ await app . selectMainWorkspaceSurface ( 'Chat' ) ;
112+ await fixture . page . waitForFunction ( ( ) =>
113+ [ ...document . querySelectorAll < HTMLButtonElement > ( '[role="tab"]' ) ] . some (
114+ ( tab ) =>
115+ ( tab . getAttribute ( 'aria-label' ) || tab . textContent ?. trim ( ) ) === 'Chat'
116+ && tab . getAttribute ( 'aria-selected' ) === 'true' ,
117+ ) ,
118+ ) ;
119+ await writeFile ( join ( project , 'large.txt' ) , `${ refreshed } \n` , 'utf8' ) ;
120+ await app . selectMainWorkspaceSurface ( 'Git' ) ;
121+ await fixture . page . waitForFunction ( ( ) =>
122+ [ ...document . querySelectorAll < HTMLButtonElement > ( '[role="tab"]' ) ] . some (
123+ ( tab ) =>
124+ ( tab . getAttribute ( 'aria-label' ) || tab . textContent ?. trim ( ) ) === 'Git'
125+ && tab . getAttribute ( 'aria-selected' ) === 'true' ,
126+ ) ,
127+ ) ;
128+ await fixture . page . waitForFunction (
129+ ( ) => document . body . textContent ?. includes ( 'The Working Tree changed.' ) ,
130+ { timeout : 5_000 } ,
115131 ) ;
116132 expect ( await fixture . page . $eval ( 'body' , ( element ) => element . textContent ) ) . toContain (
117133 'large after marker' ,
0 commit comments