Skip to content

Commit

Permalink
intro timeout to wait for animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoffrey Chong committed Aug 30, 2024
1 parent 8caf43d commit 14d4708
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState } from "react"
import { Meta } from "@storybook/react"
import { userEvent, within, expect, waitFor } from "@storybook/test"
import { set } from "date-fns"

Check failure on line 4 in packages/components/src/Notification/subcomponents/GenericNotification/GenericNotification.stories.tsx

View workflow job for this annotation

GitHub Actions / eslint

'set' is defined but never used. Allowed unused vars must match /^_/u
import { StickerSheetStory } from "~storybook/components/StickerSheet"
import { GenericNotification } from "./index"

Expand Down Expand Up @@ -48,8 +49,11 @@ export const GenericNotificationTest: StickerSheetStory = {

await userEvent.click(canvas.getByTestId("close-button"))

await waitFor(() => {
setTimeout(() => {
expect(hiddenState).toHaveTextContent("Hidden")
}, 1000)

await waitFor(() => {
expect(element).not.toBeInTheDocument()
})
},
Expand Down

0 comments on commit 14d4708

Please sign in to comment.