@@ -63,7 +63,7 @@ test('Add single tasks', async ({ page }) => {
6363 const fileChooser = await fileChooserPromise ;
6464 await fileChooser . setFiles ( path . join ( __dirname , 'data' , 'broken.json' ) ) ;
6565 await createBtn . click ( ) ;
66- expect ( await page . getByText ( "File doesn't contain valid JSON" ) . count ( ) ) . toEqual ( 1 ) ;
66+ await page . getByText ( "File doesn't contain valid JSON" ) . waitFor ( ) ;
6767 await page . getByRole ( 'button' , { name : 'Clear' } ) . click ( ) ;
6868 } ) ;
6969
@@ -73,11 +73,9 @@ test('Add single tasks', async ({ page }) => {
7373 const fileChooser = await fileChooserPromise ;
7474 await fileChooser . setFiles ( path . join ( __dirname , 'data' , 'invalid-schema.json' ) ) ;
7575 await createBtn . click ( ) ;
76- expect (
77- await page
78- . getByText ( 'File doesn\'t contain valid JSON Schema: strict mode: unknown keyword: "foo"' )
79- . count ( )
80- ) . toEqual ( 1 ) ;
76+ await page
77+ . getByText ( 'File doesn\'t contain valid JSON Schema: strict mode: unknown keyword: "foo"' )
78+ . waitFor ( ) ;
8179 await page . getByRole ( 'button' , { name : 'Clear' } ) . click ( ) ;
8280 } ) ;
8381
@@ -115,7 +113,7 @@ test('Add single tasks', async ({ page }) => {
115113 const fileChooser = await fileChooserPromise ;
116114 await fileChooser . setFiles ( path . join ( __dirname , 'data' , 'broken.json' ) ) ;
117115 await createBtn . click ( ) ;
118- expect ( await page . getByText ( "File doesn't contain valid JSON" ) . count ( ) ) . toEqual ( 1 ) ;
116+ await page . getByText ( "File doesn't contain valid JSON" ) . waitFor ( ) ;
119117 await page . getByRole ( 'button' , { name : 'Clear' } ) . click ( ) ;
120118 } ) ;
121119
0 commit comments