update test deps

This commit is contained in:
2026-05-19 09:03:49 +08:00
parent 39c33273ef
commit 7a60ba4dab
6 changed files with 118 additions and 9 deletions
+15
View File
@@ -0,0 +1,15 @@
import { test, expect } from '@playwright/test'
test('homepage loads and SPA bootstraps', async ({ page }) => {
const response = await page.goto('/')
expect(response, 'page.goto should return a response').not.toBeNull()
expect(response!.status(), 'response status < 500').toBeLessThan(500)
await page.waitForLoadState('domcontentloaded')
const title = await page.title()
expect(title.length, 'page title is non-empty').toBeGreaterThan(0)
const appRoot = page.locator('#app')
await expect(appRoot, '#app root mounts').toBeAttached()
})
-8
View File
@@ -1,8 +0,0 @@
import { test, expect } from '@playwright/test';
// See here how to get started:
// https://playwright.dev/docs/intro
test('visits the app root url', async ({ page }) => {
await page.goto('/');
await expect(page.locator('h1')).toHaveText('You did it!');
})