Skip to content

Commit

Permalink
test: switch order of tests to avoid flakniess (#63482)
Browse files Browse the repository at this point in the history
x-ref:
https://github.com/vercel/next.js/actions/runs/8344655954/job/22838765632?pr=63476

We saw the playwright execution was broken while accessing url in
turbopack tests. Switching the order to check the content first solve
the problem

Closes NEXT-2867
  • Loading branch information
huozhi authored and styfle committed Mar 19, 2024
1 parent 4804982 commit 3aae252
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/e2e/app-dir/app-basepath/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ createNextDescribe(
it('should handle redirect in dynamic in suspense boundary routes with basePath', async () => {
const browser = await next.browser('/base/dynamic/source')
await retry(async () => {
expect(await browser.url()).toBe(`${next.url}/base/dynamic/dest`)
// Check content is loaded first to avoid flakiness
expect(await browser.elementByCss('p').text()).toBe(`id:dest`)
expect(await browser.url()).toBe(`${next.url}/base/dynamic/dest`)
})
})
}
Expand Down

0 comments on commit 3aae252

Please sign in to comment.