Files
novalon-manage-system/novalon-manage-web/e2e/basic.spec.ts
T
张翔 be5d5ede90 feat: 添加异常日志功能并优化UI样式
refactor: 重构后端查询逻辑和API响应处理

fix: 修复用户角色更新和文件上传问题

test: 添加前端性能测试脚本和E2E测试用例

chore: 更新依赖版本和配置文件

docs: 添加环境检查脚本和测试文档

style: 统一表格标签样式和路由命名

perf: 优化前端页面加载速度和响应时间
2026-03-24 13:32:20 +08:00

28 lines
914 B
TypeScript

import { test, expect } from '@playwright/test';
test.describe('基础功能测试', () => {
test('后端健康检查', async ({ request }) => {
const response = await request.get('http://localhost:8084/actuator/health');
expect(response.ok()).toBeTruthy();
const health = await response.json();
expect(health.status).toBe('UP');
});
test('前端首页加载', async ({ page }) => {
await page.goto('/');
await page.waitForLoadState('networkidle');
await expect(page).toHaveURL(/.*login.*/);
});
test('登录页面可访问', async ({ page }) => {
await page.goto('/login');
await page.waitForLoadState('networkidle');
await expect(page.locator('h2')).toContainText('登录');
await expect(page.locator('input[placeholder*="用户名"]')).toBeVisible();
await expect(page.locator('input[placeholder*="密码"]')).toBeVisible();
});
});