Files
Janka UrygaandGitHub dc52e7ece3 fix: don't drop queued actions when navigating (#75362)
If we run two or more actions, the first starts executing immediately,
and the rest gets queued. The bug here was that if we navigated right
after, the navigation would make us drop the rest of the queue, which
would cause all the queued action calls to never resolve.
2025-03-06 00:02:40 +00:00

19 lines
528 B
TypeScript

import { nextTestSetup } from '../../../lib/e2e-utils'
import { retry } from '../../../lib/next-test-utils'
describe('actions', () => {
const { next } = nextTestSetup({ files: __dirname })
it('works', async () => {
const browser = await next.browser('/')
await browser.elementByCss('button').click()
await retry(
async () => {
expect(await browser.elementById('action-state').text()).toEqual('done')
},
undefined,
undefined,
'wait for both actions to finish'
)
})
})