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

app.spec.ts

15 lines390 Bytes

1import { expect, test } from '@playwright/test'
2​
3test('opening the app', async ({ page }) => {
4 await page.goto('/')
5 await page.waitForLoadState('networkidle')
6​
7 const button = page.getByTestId('add-button')
8​
9 await expect(button).toContainText('Add 1 to 0?')
10​
11 await button.click()
12 await page.waitForLoadState('networkidle')
13​
14 await expect(button).toContainText('Add 1 to 1?')
15})