Skip to content

Commit

Permalink
PaletteEdit: Fix flaky test (WordPress#61791)
Browse files Browse the repository at this point in the history
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
  • Loading branch information
3 people authored and patil-vipul committed Jun 17, 2024
1 parent 6f2d635 commit d5097c8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/components/src/palette-edit/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,13 @@ describe( 'PaletteEdit', () => {
} )
);

expect(
screen.getByRole( 'button', {
name: 'Remove all colors',
} )
).toBeVisible();
await waitFor( () => {
expect(
screen.getByRole( 'button', {
name: 'Remove all colors',
} )
).toBeVisible();
} );
} );

it( 'shows a reset option when the `canReset` prop is enabled', async () => {
Expand Down

0 comments on commit d5097c8

Please sign in to comment.