Files
hankin 815cbf9d8c v0.2.0: CRM/ERP 系统升级 - 清理 .gitignore 并移除误提交的 venv/env/db 文件
- 更新 .gitignore:全面覆盖环境变量、数据库、日志、缓存、上传文件
- 移除误跟踪的 server/venv/、crm_data.db、.env 文件
- 新增 server/.env.example 模板
- 新增合同管理、利润核算、AI教练等功能模块
- 新增 Playwright e2e 测试套件
- 前后端多项功能升级和 bug 修复
2026-05-11 07:24:19 +00:00

37 lines
1.3 KiB
TypeScript

/**
* 财务模块 E2E 测试 (修正版)
*/
import { test, expect } from '@playwright/test';
test.describe('报销大盘', () => {
test('报销大盘页面加载', async ({ page }) => {
await page.goto('/finance');
await page.waitForLoadState('networkidle');
await expect(page.locator('body')).toContainText(/票据|发票|报销|费用/, { timeout: 5000 });
});
test('票据相关内容可见', async ({ page }) => {
await page.goto('/finance');
await page.waitForLoadState('networkidle');
// 只要页面有相关内容加载
await expect(page.locator('body')).toContainText(/报销|票据|费用|支出/, { timeout: 5000 });
});
});
test.describe('销项发票', () => {
test('销项发票页面加载', async ({ page }) => {
await page.goto('/finance/sales-invoices');
await page.waitForLoadState('networkidle');
await expect(page.locator('body')).toContainText(/销项发票|发票/, { timeout: 5000 });
});
test('销项发票列表', async ({ page }) => {
await page.goto('/finance/sales-invoices');
await page.waitForLoadState('networkidle');
const table = page.locator('.el-table').first();
if (await table.isVisible({ timeout: 5000 })) {
await expect(table).toBeVisible();
}
});
});