mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
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.
19 lines
528 B
TypeScript
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'
|
|
)
|
|
})
|
|
})
|