Skip to content

Commit

Permalink
Wait for loaders more reliably
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Nov 13, 2023
1 parent b0656ef commit ff23b43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .storybook/test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ async function expectStoryToMatchSnapshot(
document.body.classList.add('storybook-test-runner')
})
if (waitForLoadersToDisappear) {
await Promise.all(LOADER_SELECTORS.map((selector) => page.waitForSelector(selector, { state: 'detached' })))
await page.waitForSelector(LOADER_SELECTORS.join(','), { state: 'detached' })
}
if (waitForSelector) {
await page.waitForSelector(waitForSelector)
Expand Down

0 comments on commit ff23b43

Please sign in to comment.