next.js/test/e2e/app-dir/navigation-with-queued-actions/index.test.ts
index.test.ts19 lines528 B
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'
    )
  })
})
Quest for Codev2.0.0
/
SIGN IN