Files
PicAnalysis/frontend/e2e/simple.spec.ts
T

17 lines
452 B
TypeScript
Raw Normal View History

2026-02-22 20:10:11 +08:00
import { test, expect } from '@playwright/test';
test('简单的访问测试', async ({ page }) => {
// 访问前端应用
await page.goto('http://localhost:3000');
// 检查页面标题
await expect(page).toHaveTitle(/frontend/);
// 截图
await page.screenshot({ path: 'screenshots/simple-e2e.png' });
// 检查是否有登录表单
const heading = page.getByText('图片分析系统');
await expect(heading).toBeVisible();
});