815cbf9d8c
- 更新 .gitignore:全面覆盖环境变量、数据库、日志、缓存、上传文件 - 移除误跟踪的 server/venv/、crm_data.db、.env 文件 - 新增 server/.env.example 模板 - 新增合同管理、利润核算、AI教练等功能模块 - 新增 Playwright e2e 测试套件 - 前后端多项功能升级和 bug 修复
47 lines
1.6 KiB
TypeScript
47 lines
1.6 KiB
TypeScript
/**
|
|
* 发货、利润、日志、复盘页面 (修正版)
|
|
*/
|
|
import { test, expect } from '@playwright/test';
|
|
|
|
test.describe('发货记录', () => {
|
|
test('发货页面加载', async ({ page }) => {
|
|
await page.goto('/shipping');
|
|
await page.waitForLoadState('networkidle');
|
|
// 验证页面加载了发货相关内容
|
|
await expect(page.locator('body')).toContainText(/发货|物流|订单/, { timeout: 5000 });
|
|
});
|
|
});
|
|
|
|
test.describe('利润核算', () => {
|
|
test('利润核算页面加载', async ({ page }) => {
|
|
await page.goto('/profit');
|
|
await page.waitForLoadState('networkidle');
|
|
await expect(page.locator('body')).toContainText(/利润|核算|成本/, { timeout: 5000 });
|
|
});
|
|
});
|
|
|
|
test.describe('销售日志', () => {
|
|
test('销售日志列表加载', async ({ page }) => {
|
|
await page.goto('/logs');
|
|
await page.waitForLoadState('networkidle');
|
|
await expect(page.locator('body')).toContainText(/销售日志|日志/, { timeout: 5000 });
|
|
});
|
|
|
|
test('新增日志入口', async ({ page }) => {
|
|
await page.goto('/logs');
|
|
await page.waitForLoadState('networkidle');
|
|
const addBtn = page.getByRole('button', { name: /新增|新建|撰写|写/ });
|
|
if (await addBtn.isVisible({ timeout: 3000 })) {
|
|
await expect(addBtn).toBeVisible();
|
|
}
|
|
});
|
|
});
|
|
|
|
test.describe('AI 智能复盘', () => {
|
|
test('复盘页面加载', async ({ page }) => {
|
|
await page.goto('/reports');
|
|
await page.waitForLoadState('networkidle');
|
|
await expect(page.locator('body')).toContainText(/复盘|报告|AI/, { timeout: 5000 });
|
|
});
|
|
});
|