Commit Graph

7 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 3711f1641a feat: payment SDK integration, attribution window config, E2E tests, CI integration, rules center tests
- WeChat Pay V3: real API calls with HMAC-SHA256 signing, AES-GCM callback decryption
- Alipay: real API calls with RSA2 signing, WAP payment support
- Both gateways fallback to MockGateway when unconfigured
- Attribution window configurable via ATTRIBUTION_WINDOW_DAYS env var (default 28)
- 30 platform-specific rule test cases (WeChat/Zhihu/Xiaohongshu/Baijiahao/Toutiao/Douyin)
- Fixed clickbait detection bug (character-level to word-level matching)
- E2E tests for diagnosis-strategy and content-monitoring flows
- CI: e2e-test job, bandit security scan, npm audit, performance baseline
2026-06-02 21:50:26 +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 65e2f3c380 feat: P0-P2功能实现 + GEO workflow分析与规划
P0 紧急修复:
- 实现诊断分析页面(SEO+GEO 5+6维度)
- 修复E2E测试: dashboard标题统一为'品牌健康中心'
- 修复建议模块API路径不一致
- 修复告警模块HTTP方法不匹配(POST→PATCH)

P1 功能实现:
- 实现监测优化页面(告警列表+配置)
- 实现组织管理页面(成员/角色/邀请)
- 实现SEO诊断5维度后端服务(63测试)
- 实现GEO诊断6维度后端服务(40测试)
- 实现诊断API端点(TDD, 6测试)
- 前端诊断页面连接真实API

P2 功能实现:
- 实现告警设置API端点(TDD, 11测试)
- 实现套餐额度预警服务(TDD, 37测试)
- 实现邮件通知服务(TDD, 30测试)

GEO Workflow分析:
- 10步闭环流程设计(替代原7步)
- 7个缺失节点技术方案
- 4阶段12周开发计划
- 完整技术架构设计
2026-05-25 09:45:18 +08:00
chiguyong 9e63915f42 feat: 完成系统真实化改造 + Mock清除 + 文档编写
- 实现 Onboarding 后端 API(6个端点完整对接)
- 接入百炼 DashScope LLM(qwen3-coder-plus 真实引用检测)
- 修复知识库 MockEmbedder(自动检测 API Key 切换真实 Embedder)
- 内容生成对接 RAG 知识库检索
- 清除前端 onboarding 硬编码假数据(改为错误提示+重试)
- 移除模拟加载延迟(setTimeout)
- Pipeline dry-run 模式添加生产环境告警
- 添加操作流程文档和后续待办事项文档
- 更新 .gitignore 排除测试产物和临时文件
2026-05-23 21:35:10 +08:00
chiguyong 84ed5bf31a feat: GEO平台P0-P1核心功能重构 2026-05-23 09:34:58 +08:00