mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
a040e38f36
Addressing this test being very flakey as well x-ref: https://github.com/vercel/next.js/actions/runs/21887115229/job/63188106850
25 lines
772 B
TypeScript
25 lines
772 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
import { retry } from 'next-test-utils'
|
|
|
|
describe('navigating without a prefetch', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
it('can show a loading boundary from the dynamic response', async () => {
|
|
const browser = await next.browser('/')
|
|
|
|
// Navigate to a dynamic page with a `loading.tsx` without a prefetch.
|
|
await browser.elementByCss('a[href="/with-loading"]').click()
|
|
|
|
// The page suspends on the client, so we should display the `loading` that we got from the dynamic response.
|
|
await retry(async () => {
|
|
expect(
|
|
await browser
|
|
.elementByCss('#loading-component', { state: 'visible' })
|
|
.text()
|
|
).toContain('Loading...')
|
|
})
|
|
})
|
|
})
|