Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rogin Farrer committed May 20, 2024
1 parent 25036f7 commit addfe85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion react-aria-carousel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"test-storybook": "test-storybook",
"lint": "eslint .",
"ci:run-storybook": "http-server storybook-static --port 6006 --silent",
"ci:test-storybook": "wait-on tcp:6006 && bun test-storybook"
"ci:test-storybook": "wait-on tcp:6006 && bun test-storybook",
"chromatic": "bunx chromatic"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.3.4",
Expand Down
6 changes: 5 additions & 1 deletion react-aria-carousel/stories/Test.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ export const Autoplay: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const btn = canvas.getByLabelText("Disable autoplay");
expect(canvas.getByLabelText("1 of 4")).not.toHaveAttribute("aria-hidden");
await waitFor(() => {
expect(canvas.getByLabelText("1 of 4")).not.toHaveAttribute(
"aria-hidden",
);
});
await wait(600);
await waitFor(() => {
expect(canvas.getByLabelText("1 of 4")).toHaveAttribute("aria-hidden");
Expand Down

0 comments on commit addfe85

Please sign in to comment.