Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

app.spec.ts

17 lines539 Bytes

1import { expect, test } from '@playwright/test'
2​
3// Reproduces https://github.com/TanStack/router/issues/7195
4test('layout with useQuery renders child after client navigation', async ({
5 page,
6}) => {
7 await page.goto('/')
8 await expect(page.getByText('πŸ‘‰ To page2')).toBeVisible()
9 await page.waitForLoadState('networkidle')
10​
11 await page.getByText('πŸ‘‰ To page2').click()
12​
13 await expect(page.getByTestId('page2-content')).toBeVisible({
14 timeout: 5_000,
15 })
16 await expect(page.getByTestId('layout-content')).toBeVisible()
17})