mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Adds a failing test proving that if the RSC response from a prefetch
contains an unresolved promise, navigating to the page will cause the
Suspense boundary wrapping the use of that promise to remain in fallback
state indefinitely.
This appears to have regressed in
e9a03ac12c, though the theory is that this
is just uncovering a React bug rather than causing the issue.
Closes #89170
18 lines
493 B
TypeScript
18 lines
493 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
import { retry } from 'next-test-utils'
|
|
|
|
describe('prefetch-partial-rsc', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
it('resolves after a client-side navigation', async () => {
|
|
const browser = await next.browser('/')
|
|
await browser.elementByCss('#learn-link').click()
|
|
await retry(async () => {
|
|
const text = await browser.elementByCss('#user').text()
|
|
expect(text).toBe('user: Guest')
|
|
})
|
|
})
|
|
})
|