@@ -11,6 +11,7 @@ import {
1111 runTypecheck ,
1212 setComponentEditorSource ,
1313 setStylesEditorSource ,
14+ waitForLintDiagnosticsIssues ,
1415 waitForInitialRender ,
1516} from './helpers/app-test-helpers.js'
1617
@@ -337,9 +338,7 @@ test('component lint reports missing button type prop', async ({ page }) => {
337338
338339 await runComponentLint ( page )
339340
340- await expect ( page . getByText ( / R e n d e r e d \( L i n t i s s u e s : [ 1 - 9 ] \d * \) / ) ) . toBeVisible ( )
341- await ensureDiagnosticsDrawerOpen ( page )
342- await expect ( page . getByText ( 'Biome reported issues.' ) ) . toBeVisible ( )
341+ await waitForLintDiagnosticsIssues ( page )
343342 await expect ( page . getByText ( / a 1 1 y \/ u s e B u t t o n T y p e / ) ) . toBeVisible ( )
344343} )
345344
@@ -354,10 +353,7 @@ test('styles diagnostics rows navigate editor to reported line', async ({ page }
354353
355354 await runStylesLint ( page )
356355
357- await expect ( page . getByRole ( 'button' , { name : / ^ D i a g n o s t i c s / } ) ) . toHaveClass (
358- / d i a g n o s t i c s - t o g g l e - - e r r o r / ,
359- )
360- await ensureDiagnosticsDrawerOpen ( page )
356+ await waitForLintDiagnosticsIssues ( page )
361357
362358 const targetDiagnostic = page . getByRole ( 'button' , { name : / ^ L 3 ( : \d + ) ? \s / } ) . first ( )
363359 await expect ( targetDiagnostic ) . toBeVisible ( )
@@ -375,9 +371,10 @@ test('styles lint reports CSS syntax errors', async ({ page }) => {
375371
376372 await runStylesLint ( page )
377373
378- await expect ( page . getByText ( / R e n d e r e d \( L i n t i s s u e s : [ 1 - 9 ] \d * \) / ) ) . toBeVisible ( )
379- await ensureDiagnosticsDrawerOpen ( page )
380- await expect ( page . getByText ( 'Biome reported issues.' ) ) . toBeVisible ( )
374+ await waitForLintDiagnosticsIssues ( page )
375+ await expect ( page . locator ( '#diagnostics-styles' ) ) . toContainText (
376+ 'Biome reported issues.' ,
377+ )
381378} )
382379
383380test ( 'sass compiler warnings surface in styles diagnostics' , async ( { page } ) => {
0 commit comments