diff --git a/packages/shared-ui/components/cart/stories/Cart.stories.tsx b/packages/shared-ui/components/cart/stories/Cart.stories.tsx index ca4450a..435490f 100644 --- a/packages/shared-ui/components/cart/stories/Cart.stories.tsx +++ b/packages/shared-ui/components/cart/stories/Cart.stories.tsx @@ -126,7 +126,7 @@ export const API: StoryObj = { await step("add to cart", async () => { await userEvent.click(canvas.getByRole("button", { name: /product1/i })); await userEvent.click(canvas.getByRole("button", { name: /product2/i })); - expect(canvas.getByTestId("cart")).toHaveTextContent("Cart3"); + await waitFor(() => expect(canvas.getByTestId("cart")).toHaveTextContent("Cart3")); }); await step("open cart and modify quantity", async () => {