rsnext/test/e2e/app-dir/css-client-side-nav-parallel-routes/css-client-side-nav-parallel-routes.test.ts
JJ Kasper 7e34b4cf98
Tweak flakey metadata error tests (#66060)
Seems we weren't grabbing the latest cli output inside of `check` so if
it wasn't ready by the time the first check successive checks wouldn't
have it either.

x-ref:
https://github.com/vercel/next.js/actions/runs/9182806177/job/25253023758
x-ref:
https://github.com/vercel/next.js/actions/runs/9182324607/job/25254072867
2024-05-21 21:53:16 -05:00

24 lines
758 B
TypeScript

import { nextTestSetup } from 'e2e-utils'
import { retry } from 'next-test-utils'
describe('css-client-side-nav-parallel-routes', () => {
const { next } = nextTestSetup({
files: __dirname,
})
// Recommended for tests that need a full browser
it('should apply styles after navigation', async () => {
const browser = await next.browser('/source')
await browser.elementByCss('a').click()
// transition might not be instant so we wrap in retry
retry(async () => {
expect(
await browser.elementByCss('#global').getComputedCss('background-color')
).toBe('rgb(0, 255, 0)')
expect(
await browser.elementByCss('#module').getComputedCss('background-color')
).toBe('rgb(0, 255, 0)')
})
})
})