Open History to see the last commit
1import { expect, test } from '@playwright/test'
2β
3const routeTestId = 'selected-route-label'
4β
5test('resolves to the latest version on load of a project like "/router"', async ({
6 page,
7}) => {
8 await page.goto('/router')
9β
10 await expect(page.getByTestId(routeTestId)).toContainText('/router/latest')
11})
12β
13test('resolves to the overview docs page', async ({ page }) => {
14 await page.goto('/router/latest/docs')
15β
16 await expect(page.getByTestId(routeTestId)).toContainText(
17 '/router/latest/docs/framework/solid/overview',
18 )
19})
20β
21test('clicking on Documentation link navigates to the overview docs page', async ({
22 page,
23}) => {
24 await page.goto('/router')
25 await page.waitForLoadState('networkidle')
26β
27 const documentationLink = page.getByLabel('Documentation')
28 await documentationLink.click()
29 await page.waitForLoadState('networkidle')
30β
31 const pathname = new URL(page.url()).pathname
32 expect(pathname).toBe('/router/latest/docs/framework/solid/overview')
33})