Skip to content

Commit

Permalink
test(component-library): add wait to reduce flakiness of priority plu…
Browse files Browse the repository at this point in the history
…s test
  • Loading branch information
Haberkamp committed Jan 23, 2025
1 parent f7ec283 commit 73f49c7
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const VisualTestHidesTheLastThreeItems: StoryObj = {

// We need to wait until the component updated itself
await waitFor(() => expect(canvas.getByText("Item 1")).toHaveAttribute("aria-hidden", "false"));
await waitFor(() => expect(canvas.getByText("Item 10")).toHaveAttribute("aria-hidden", "true"));

await expect(canvas.getByText("Item 1")).toHaveAttribute("aria-hidden", "false");
await expect(canvas.getByText("Item 2")).toHaveAttribute("aria-hidden", "false");
Expand Down

0 comments on commit 73f49c7

Please sign in to comment.