@@ -19,16 +19,14 @@ import {
1919// to complete in time, so we just assert that they all start out ready and end
2020// up complete
2121async function expectUploadProcess ( page : Page ) {
22- const steps = page . locator ( 'div[data-status]' )
23-
24- for ( const step of await steps . all ( ) ) {
25- await expect ( step ) . toHaveAttribute ( 'data-status' , 'ready' , { timeout : 10000 } )
26- }
27-
2822 // check these here instead of first because if we don't look for the ready
2923 // states right away we won't catch them in time
3024 const progressModal = page . getByRole ( 'dialog' , { name : 'Image upload progress' } )
3125 await expect ( progressModal ) . toBeVisible ( )
26+
27+ const steps = page . getByTestId ( 'upload-step' )
28+ await expect ( steps ) . toHaveCount ( 8 )
29+
3230 const done = progressModal . getByRole ( 'button' , { name : 'Done' } )
3331
3432 for ( const step of await steps . all ( ) ) {
@@ -234,12 +232,6 @@ test.describe('Image upload', () => {
234232
235233 await page . click ( 'role=button[name="Upload image"]' )
236234
237- const steps = page . locator ( 'div[data-status]' )
238-
239- for ( const step of await steps . all ( ) ) {
240- await expect ( step ) . toHaveAttribute ( 'data-status' , 'ready' )
241- }
242-
243235 const step = page . locator ( '[data-status]' ) . filter ( { hasText : stepText } ) . first ( )
244236 await expect ( step ) . toHaveAttribute ( 'data-status' , 'error' , { timeout : 15000 } )
245237 await expectVisible ( page , [
0 commit comments