mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-30 22:32:47 -07:00
feat: Add e2e setup and tests (#535)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { test, expect } from '@playwright/test'
|
||||
|
||||
test('it renders index page', async ({ page }) => {
|
||||
await page.goto('/')
|
||||
const header = await page.textContent('h1')
|
||||
const subtitle = await page.textContent('h2')
|
||||
expect(header).toContain('TUONO')
|
||||
expect(subtitle).toContain('Subtitle received from the server')
|
||||
})
|
||||
|
||||
test('it renders second route', async ({ page }) => {
|
||||
await page.goto('/second-route')
|
||||
const header = await page.textContent('h1')
|
||||
expect(header).toContain('Second route')
|
||||
})
|
||||
|
||||
test('it routes to second route on link click', async ({ page }) => {
|
||||
await page.goto('/')
|
||||
await page.click('text=Routing link')
|
||||
await page.waitForURL('/second-route')
|
||||
const header = await page.textContent('h1')
|
||||
expect(header).toContain('Second route')
|
||||
})
|
||||
Reference in New Issue
Block a user