Skip to content

Commit

Permalink
fix invalid test
Browse files Browse the repository at this point in the history
  • Loading branch information
ztanner committed Oct 1, 2024
1 parent bd5657f commit 6bbbe48
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/next/src/server/app-render/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export type InitialRSCPayload = {
G: React.ComponentType<any>
/** postponed */
s: boolean
/** isPrerender */
/** prerendered */
S: boolean
}

Expand All @@ -233,7 +233,7 @@ export type NavigationFlightResponse = {
b: string
/** flightData */
f: FlightData
/** isPrerender */
/** prerendered */
S: boolean
}

Expand Down
10 changes: 7 additions & 3 deletions test/e2e/app-dir/revalidatetag-rsc/revalidatetag-rsc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ describe('revalidateTag-rsc', () => {
await browser.refresh()
const randomNumber2 = await browser.elementById('data').text()
expect(randomNumber).toEqual(randomNumber2)

await browser.elementByCss('#revalidate-via-page').click()
await browser.waitForElementByCss('#home')
await browser.elementByCss('#home').click()
await browser.waitForElementByCss('#data')
const randomNumber3 = await browser.elementById('data').text()
expect(randomNumber3).not.toEqual(randomNumber)
await retry(async () => {
// need to refresh to evict client router cache
await browser.refresh()
await browser.waitForElementByCss('#data')
const randomNumber3 = await browser.elementById('data').text()
expect(randomNumber3).not.toEqual(randomNumber)
})
})
})

0 comments on commit 6bbbe48

Please sign in to comment.