File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
packages/core/__tests__/e2e Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,15 @@ test.describe('Zero-UI Next Integration', () => {
2020
2121
2222 // 2️⃣ Assert initial state
23- await expect . poll ( ( ) => body . getAttribute ( attr ) ) . toBe ( 'light' , ( console . log ( `✅ ${ body } has data-theme ${ attr } is light` ) ) ) ;
24- await expect . poll ( ( ) => button . isVisible ( ) ) . toBe ( true , ( console . log ( `✅ ${ button } is visible` ) ) ) ; // auto-retries until true
23+ await expect . poll ( async ( ) => await body . getAttribute ( attr ) ) . toBe ( 'light' ) ;
24+ await expect . poll ( async ( ) => await button . isVisible ( ) ) . toBe ( true ) ; // auto-retries until true
2525
2626
2727 // 3️⃣ Action
2828 await button . click ( ( console . log ( `✅ ${ button } clicked` ) ) ) ;
2929
3030 // 4️⃣ Final state
31- await expect ( body ) . toHaveAttribute ( attr , 'dark' , ( console . log ( `✅ body attr changes after click` ) ) ) ;
31+ await expect . poll ( async ( ) => await body . getAttribute ( attr ) ) . toBe ( 'dark' ) ;
3232 } ) ;
3333 }
3434} ) ;
Original file line number Diff line number Diff line change @@ -20,15 +20,15 @@ test.describe('Zero-UI Vite Integration', () => {
2020
2121
2222 // 2️⃣ Assert initial state
23- await expect . poll ( ( ) => body . getAttribute ( attr ) ) . toBe ( 'light' , ( console . log ( `✅ ${ body } has data-theme ${ attr } is light` ) ) ) ;
24- await expect . poll ( ( ) => button . isVisible ( ) ) . toBe ( true , ( console . log ( `✅ ${ button } is visible` ) ) ) ; // auto-retries until true
23+ await expect . poll ( async ( ) => await body . getAttribute ( attr ) ) . toBe ( 'light' ) ;
24+ await expect . poll ( async ( ) => await button . isVisible ( ) ) . toBe ( true ) ; // auto-retries until true
2525
2626
2727 // 3️⃣ Action
2828 await button . click ( ( console . log ( `✅ ${ button } clicked` ) ) ) ;
2929
3030 // 4️⃣ Final state
31- await expect ( body ) . toHaveAttribute ( attr , 'dark' , ( console . log ( `✅ body attr changes after click` ) ) ) ;
31+ await expect . poll ( async ( ) => await body . getAttribute ( attr ) ) . toBe ( 'dark' ) ;
3232 } ) ;
3333 }
3434} ) ;
You can’t perform that action at this time.
0 commit comments