Skip to content

Commit 7f22377

Browse files
committed
fix flakey assertion
1 parent 2fb6ca3 commit 7f22377

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/e2e/app-dir/revalidatetag-rsc/revalidatetag-rsc.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { nextTestSetup } from 'e2e-utils'
2+
import { retry } from 'next-test-utils'
23

34
describe('revalidateTag-rsc', () => {
45
const { next } = nextTestSetup({
@@ -13,9 +14,11 @@ describe('revalidateTag-rsc', () => {
1314
expect(randomNumber).toEqual(randomNumber2)
1415

1516
await browser.elementByCss('#submit-form').click()
16-
await browser.waitForIdleNetwork()
17-
const randomNumber3 = await browser.elementById('data').text()
18-
expect(randomNumber3).not.toEqual(randomNumber)
17+
18+
await retry(async () => {
19+
const randomNumber3 = await browser.elementById('data').text()
20+
expect(randomNumber3).not.toEqual(randomNumber)
21+
})
1922
})
2023

2124
it('should revalidate fetch cache if revalidateTag invoked via server component', async () => {

0 commit comments

Comments
 (0)