v0.2.0: CRM/ERP 系统升级 - 清理 .gitignore 并移除误提交的 venv/env/db 文件

- 更新 .gitignore:全面覆盖环境变量、数据库、日志、缓存、上传文件
- 移除误跟踪的 server/venv/、crm_data.db、.env 文件
- 新增 server/.env.example 模板
- 新增合同管理、利润核算、AI教练等功能模块
- 新增 Playwright e2e 测试套件
- 前后端多项功能升级和 bug 修复
This commit is contained in:
hankin
2026-05-11 07:24:19 +00:00
parent 0f4c6b7924
commit 815cbf9d8c
2526 changed files with 11875 additions and 804148 deletions
+50
View File
@@ -0,0 +1,50 @@
/**
* 系统设置 E2E 测试 (根据真实截图修正)
* 三个 Tab:
* - 部门与员工管理
* - 角色与权限控制 (RBAC)
* - 企业账号配置
*/
import { test, expect } from '@playwright/test';
test.describe('系统设置', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/settings');
await page.waitForLoadState('networkidle');
});
test('设置页面正确加载', async ({ page }) => {
// 三个 Tab 标题
await expect(page.getByText('部门与员工管理')).toBeVisible({ timeout: 5000 });
await expect(page.getByText('角色与权限控制')).toBeVisible();
await expect(page.getByText('企业账号配置')).toBeVisible();
});
test('部门与员工管理 tab 内容', async ({ page }) => {
const deptTab = page.getByText('部门与员工管理').first();
await deptTab.click();
await page.waitForTimeout(1000);
// 应显示部门树或员工列表
await expect(page.locator('body')).toContainText(/部门|员工/, { timeout: 3000 });
});
test('角色与权限控制 tab', async ({ page }) => {
await page.getByText('角色与权限控制').first().click();
await page.waitForTimeout(1500);
// 左侧应有角色列表区域
await expect(page.getByText('平台运营角色')).toBeVisible({ timeout: 5000 });
await expect(page.getByText('新增角色')).toBeVisible();
});
test('新增角色按钮', async ({ page }) => {
await page.getByText('角色与权限控制').first().click();
await page.waitForTimeout(1000);
await expect(page.getByText('新增角色')).toBeVisible({ timeout: 3000 });
});
test('企业账号配置 tab', async ({ page }) => {
await page.getByText('企业账号配置').first().click();
await page.waitForTimeout(1000);
await expect(page.locator('body')).toContainText(/企业|账号/, { timeout: 3000 });
});
});