diff --git a/.storybook/test-runner-jest.ts b/.storybook/test-runner-jest.ts index fb9de752..facc4d10 100644 --- a/.storybook/test-runner-jest.ts +++ b/.storybook/test-runner-jest.ts @@ -1,4 +1,4 @@ -import { getJestConfig } from '@storybook/test-runner'; +import { getJestConfig, waitForPageReady } from '@storybook/test-runner'; // The default Jest configuration comes from @storybook/test module.exports = { // The default Jest configuration comes from @storybook/test @@ -7,5 +7,9 @@ module.exports = { * to merge testRunnerConfig properties with your own * @see https://jestjs.io/docs/configuration */ - testTimeout: 60000, + testTimeout: 30000, + + async postVisit(page) { + await waitForPageReady(page); + }, };