app/tests/e2e/example.spec.ts

10 lines
343 B
TypeScript

import { test, expect } from '@playwright/test'
test('happy path: home loads and increments', async ({ page }) => {
await page.goto('/')
await expect(page.getByRole('heading', { name: 'Welcome' })).toBeVisible()
await page.getByRole('button', { name: /Increment/ }).click()
await expect(page.getByText(/Count: 1/)).toBeVisible()
})