@@ -172,14 +172,20 @@ test('chart points open the shared tooltip by pointer and by keyboard', async ({
172172test ( 'long lists page quietly with edge fades only where content continues' , async ( { page } ) => {
173173 await page . goto ( fixtureUrl ( '/workspace/workspace-0/logs?state=stress' ) )
174174 const rows = main ( page ) . getByRole ( 'list' , { name : 'Runs' } ) . getByRole ( 'listitem' )
175- await expect ( rows ) . toHaveCount ( 50 )
175+ // The list mounts only the rows near view; each row's `data-index` is its place among those read.
176+ const lastRead = ( ) =>
177+ rows . evaluateAll ( ( items ) =>
178+ Math . max ( - 1 , ...items . map ( ( item ) => Number ( item . getAttribute ( 'data-index' ) ) ) )
179+ )
180+ await expect ( rows . first ( ) ) . toBeVisible ( )
181+ expect ( await lastRead ( ) ) . toBeLessThan ( 50 )
176182 const region = page
177183 . locator ( '[data-scroll-axis="vertical"]' )
178184 . filter ( { has : page . locator ( 'main:visible' ) } )
179185 await expect ( region ) . toHaveAttribute ( 'data-edges' , 'end' )
180186 await page . mouse . move ( 700 , 500 )
181187 for ( let step = 0 ; step < 6 ; step += 1 ) await page . mouse . wheel ( 0 , 4000 )
182- await expect . poll ( ( ) => rows . count ( ) ) . toBeGreaterThan ( 50 )
188+ await expect . poll ( lastRead ) . toBeGreaterThanOrEqual ( 50 )
183189 await expect ( region ) . toHaveAttribute ( 'data-edges' , / b o t h | s t a r t / )
184190 await expect ( main ( page ) . getByText ( / L o a d i n g | L o a d m o r e / ) ) . toHaveCount ( 0 )
185191} )
@@ -232,7 +238,7 @@ test('a run opens its trace and selected step, with its execution ID among its f
232238} ) => {
233239 await page . goto ( fixtureUrl ( '/workspace/it/logs?state=full' ) )
234240 const rows = main ( page ) . getByRole ( 'list' , { name : 'Runs' } ) . getByRole ( 'listitem' )
235- await expect ( rows ) . toHaveCount ( 50 )
241+ await expect ( rows . nth ( 4 ) ) . toBeVisible ( )
236242 await rows . nth ( 4 ) . getByRole ( 'link' ) . click ( )
237243 await expect (
238244 main ( page ) . getByRole ( 'heading' , { level : 1 , name : / ^ R u n [ 0 - 9 a - f ] { 8 } $ / } )
@@ -279,6 +285,7 @@ test('trace rows share one disclosure-to-name gap and hang guides under open par
279285 )
280286 const guide = guides . at ( - 1 )
281287 return {
288+ name : target ?. querySelector ( '[data-type="T060"]' ) ?. textContent ?? '' ,
282289 marked : ( target ?. firstElementChild ?. childElementCount ?? 0 ) > 0 ,
283290 gap : name && disclosure ? Math . round ( name . left - disclosure . left ) : null ,
284291 disclosureCenter : disclosure ? disclosure . left + disclosure . width / 2 : null ,
@@ -290,7 +297,10 @@ test('trace rows share one disclosure-to-name gap and hang guides under open par
290297 }
291298 } )
292299 )
293- expect ( rows . every ( ( row ) => row . marked ) ) . toBe ( true )
300+ // Every step carries its mark except a parallel's branches and a loop's iterations, as legacy.
301+ expect ( rows . some ( ( row ) => / ^ ( B r a n c h | I t e r a t i o n ) \d + $ / . test ( row . name ) ) ) . toBe ( true )
302+ for ( const row of rows )
303+ expect ( row . marked , row . name ) . toBe ( ! / ^ ( B r a n c h | I t e r a t i o n ) \d + $ / . test ( row . name ) )
294304 expect ( new Set ( rows . map ( ( row ) => row . gap ) ) . size ) . toBe ( 1 )
295305 for ( const [ index , row ] of rows . entries ( ) ) {
296306 if ( ! row . depth ) continue
0 commit comments