Commit Graph

4 Commits

Author SHA1 Message Date
chiguyong d14d500e02 feat: E2E shared fixtures, API mock layer, interaction + error tests
- Create shared Playwright fixtures (authenticatedPage, mockApi, etc.)
- Create API mock layer using page.route() interception
- Refactor 14 existing test files to use shared fixtures
- Add 5 new E2E test files:
  - health-score-interaction: score dimension details, tab switching
  - citation-flow: search, filter, detail view, export
  - competitor-interaction: add/compare/remove competitors
  - error-states: API 500, offline, empty data, 401 redirect
  - knowledge-interaction: create KB, upload/delete documents
2026-06-04 14:06:25 +08:00
chiguyong b41da42d74 feat(geo): U1-U9 monetization closed loop implementation
U1: GEO diagnosis auto data collection (DataCollectorService + 11 tests)
U2: Free GEO health score public page (HealthScoreAPI + 7 tests)
U3: Onboarding redesign with conversion layer (Step0 + UpgradePrompt + 14 tests)
U4: Real payment integration (WeChat/Alipay gateway + PaymentOrder + 12 tests)
U5: AI content generation & distribution (Publishers + PublishEngine + 11 tests)
U6: Attribution system & ROI reports (AttributionEngine + ROICalculator + 12 tests)
U7: Email integration & Dashboard monetization UI (EmailScheduler + templates + 22 tests)
U8: Integration tests & shared fixtures (monetization flow + fixture consolidation + 12 tests)
U9: E2E smoke tests (HealthScorePage + acquisition/core flow + 4 E2E cases)

Total: 101 new backend tests passing, 4 E2E test cases
All third-party integrations use mock mode by default with config center management
2026-06-01 07:39:05 +08:00
chiguyong 900a90ba84 fix: 修复数据库schema兼容性和E2E测试
后端修复:
- User模型添加organization_id和role字段,匹配Prisma数据库schema
- SQLAlchemy模型FK类型从UUID改为String(36),匹配users.id的text类型
- lifespan中create_all改为SELECT 1,避免与Prisma schema冲突
- 数据库驱动从asyncpg切换到psycopg,修复macOS Unix socket问题
- auth API使用UserResponse.from_user()处理属性映射
- 修复auth service使用正确的列名(password/username)

E2E测试修复:
- hasProjects()先等待页面加载完成再检测空/错误状态
- loginAndWait增加60s超时和重试逻辑,解决NextAuth间歇性超时
- login-redirect-system-chrome添加browserName skip和重试
- login-redirect子页面测试使用domcontentloaded等待策略
- Dashboard空状态下依赖项目的测试正确skip
- playwright.config.ts reuseExistingServer硬编码为true
2026-05-27 20:57:49 +08:00
chiguyong 84ed5bf31a feat: GEO平台P0-P1核心功能重构 2026-05-23 09:34:58 +08:00