Skip to content

Commit

Permalink
wait
Browse files Browse the repository at this point in the history
  • Loading branch information
nlkluth committed Dec 4, 2023
1 parent b2e06d3 commit 98f0adb
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export const API: StoryObj<typeof Cart> = {
play: async ({ canvasElement, step }) => {
const canvas = within(canvasElement);
await step("add to cart", async () => {
await waitFor(() => expect(canvas.getByTestId("cart")).toHaveTextContent("Cart1"));
await userEvent.click(canvas.getByRole("button", { name: /product1/i }));
await userEvent.click(canvas.getByRole("button", { name: /product2/i }));
await waitFor(() => expect(canvas.getByTestId("cart")).toHaveTextContent("Cart3"));
Expand Down

0 comments on commit 98f0adb

Please sign in to comment.