Commit Graph

96 Commits

Author SHA1 Message Date
张翔 ac2672729f feat: 实现内容管理API及相关功能
refactor(services-section): 重构服务展示组件使用API数据
refactor(news-section): 重构新闻展示组件使用API数据
refactor(products-section): 重构产品展示组件使用API数据

test: 添加API客户端和服务钩子的单元测试
test(e2e): 添加配置验证和API响应格式的端到端测试

ci: 更新Playwright测试配置
2026-03-13 18:55:25 +08:00
张翔 72745456d2 test: add integration tests for configuration API and database operations 2026-03-13 15:18:46 +08:00
张翔 490a2172b8 test: add comprehensive E2E tests for configuration linkage
- Add config-persistence.spec.ts for configuration persistence tests
- Add config-concurrency.spec.ts for concurrent modification tests
- Add config-edge-cases.spec.ts for edge case tests
- Test scenarios:
  - Configuration persistence across server restarts
  - Concurrent modifications by multiple admins
  - Empty values, negative numbers, large values
  - Special characters, invalid sort values
  - Rapid toggling and configuration reset
  - Non-existent configuration items
  - Multiple simultaneous configuration changes
2026-03-13 14:48:59 +08:00
张翔 259b790309 fix: update E2E test selectors and improve login stability
- Fix selectors to use config keys instead of Chinese labels
- Add page load waiting and element visibility checks
- Improve global setup with better error handling
- Update all config-linkage tests with correct selectors
2026-03-13 13:35:10 +08:00
张翔 c5c3685d13 test: add frontend-backend configuration linkage E2E tests
- Add config-toggle.spec.ts for module show/hide tests
- Add config-params.spec.ts for configuration parameter tests
- Test Services module toggle and items filtering
- Test Products module toggle, pricing display, and featured products
- Test News module toggle, display count, categories, and sort order
- Verify real-time configuration updates between admin and frontend
2026-03-13 13:13:48 +08:00
张翔 4fdfc2d8b4 feat: implement frontend-backend configuration linkage
- Create public config API for frontend consumption
- Add configuration fetching to homepage
- Implement module show/hide logic based on config
- Add support for Services items filtering
- Add support for Products featured products and pricing display
- Add support for News display count, categories, and sort order
- Fix table name from 'configs' to 'siteConfig' in API route
- Update type definitions for proper TypeScript support
2026-03-13 13:11:20 +08:00
张翔 ca4342d81d fix: resolve TypeScript compilation error and add verification script 2026-03-13 12:05:00 +08:00
张翔 6c6e9f002f feat: add test performance optimization tool 2026-03-13 11:58:15 +08:00
张翔 b09673b036 feat: add test monitoring and alerting system 2026-03-13 11:56:02 +08:00
张翔 b86ca1f428 feat: add Woodpecker CI configuration for tiered testing 2026-03-13 11:52:32 +08:00
张翔 93b1af3c8d feat: add enhanced test reporter with tiered analysis 2026-03-13 11:41:14 +08:00
张翔 33a2dd454f feat: integrate test history recording into test execution 2026-03-13 11:38:00 +08:00
张翔 dd1ea3f9a9 feat: add intelligent test scheduler 2026-03-13 11:31:53 +08:00
张翔 a3e7114349 feat: add test execution history manager 2026-03-13 11:30:07 +08:00
张翔 f272e8499d feat: add test tags and priority system 2026-03-13 11:27:56 +08:00
张翔 31e8682007 feat: add test tier configuration and tiered playwright config 2026-03-13 11:24:40 +08:00
张翔 95d3758b51 feat: add DISABLE_WEB_SERVER env var to skip web server 2026-03-12 22:15:17 +08:00
张翔 b7cf440b71 feat: add permissions control E2E tests 2026-03-12 22:11:59 +08:00
张翔 b7a03fa590 feat: add rich text editor E2E tests 2026-03-12 22:10:14 +08:00
张翔 8266926d78 feat: add service management E2E tests 2026-03-12 22:07:32 +08:00
张翔 1cd7d30dc2 feat: add news management E2E tests 2026-03-12 22:06:01 +08:00
张翔 f846b38807 feat: add case management E2E tests 2026-03-12 22:04:32 +08:00
张翔 05b67a5766 feat: add product management E2E tests 2026-03-12 22:03:16 +08:00
张翔 9db07d58c3 fix: resolve test skip issues in admin regression tests 2026-03-12 21:59:39 +08:00
张翔 d378be9ec1 fix: improve admin login test stability and fix admin email 2026-03-12 21:56:49 +08:00
张翔 27f6278f00 feat: add test data management for admin E2E tests 2026-03-12 21:51:41 +08:00
张翔 b207bfa7af feat: 增加测试覆盖率并优化代码质量
test: 添加单元测试和端到端测试
refactor: 重构登录页面和上传模块
ci: 更新测试覆盖率阈值至42%
build: 添加测试相关依赖
docs: 更新测试文档
style: 修复代码格式问题
2026-03-11 11:14:37 +08:00
张翔 e8dffa4f05 chore: remove GitHub Actions workflows, use Woodpecker CI exclusively 2026-03-10 13:10:11 +08:00
张翔 4ece85a9c3 feat: 添加生产环境部署和监控配置
- 新增生产环境部署脚本和文档
- 添加监控系统配置(Alertmanager, Prometheus, Grafana)
- 更新e2e测试用例以适配新环境
- 添加.env.production配置文件
- 优化Sentry初始化逻辑为动态加载
- 新增全局设置脚本以支持不同环境
2026-03-09 16:37:23 +08:00
张翔 4897c6e11c feat: 建立监控告警体系和生产环境配置
阶段三:建立监控告警体系
- 集成Sentry错误监控:安装依赖,创建配置文件,初始化Sentry
- 配置性能监控:创建监控工具类,实现健康检查API
- 更新环境变量模板,添加Sentry和数据库配置

阶段四:配置生产环境
- 创建生产环境变量模板
- 创建Dockerfile和docker-compose.prod.yml
- 创建备份和恢复脚本
- 设置脚本执行权限
2026-03-09 11:00:42 +08:00
张翔 6d92024b63 feat: 修复测试套件问题并添加Woodpecker CI配置
- 修复API测试认证问题:创建全局认证设置,更新Playwright配置
- 优化回归测试稳定性:增加超时时间到15秒,修复定位器
- 创建Woodpecker CI工作流:CI、部署和质量门禁配置
- 添加Jest配置和测试脚本
- 移除登录页面的默认账号密码显示(安全问题修复)
2026-03-09 10:26:02 +08:00
张翔 0175799004 docs: 删除过时的文档和测试报告文件
删除不再需要的文档、测试报告和计划文件,包括标题层级规范、颜色优化报告、测试框架文档等
2026-03-07 15:37:19 +08:00
张翔 11b0123c20 feat: add visual regression test snapshots
Add Playwright visual regression test baseline snapshots for:
- Contact page (22 snapshots)
- Home page (18 snapshots)
- Visual regression suite (35 snapshots)

Total: 75 baseline snapshots (~9.6MB)

These snapshots serve as visual regression testing baselines and should
be committed to version control according to Playwright best practices.

Benefits:
- Ensures UI consistency across changes
- Detects unintended visual changes
- Provides baseline for cross-browser testing
- Enables team collaboration with consistent snapshots

Following Playwright documentation:
https://playwright.dev/docs/test-snapshots

Snapshots are stored in:
- e2e/src/tests/visual/contact-page.visual.spec.ts-snapshots/
- e2e/src/tests/visual/home-page.visual.spec.ts-snapshots/
- e2e/src/tests/visual/visual-regression.spec.ts-snapshots/~
2026-03-07 15:16:16 +08:00
张翔 92af40df8e fix: resolve test failures and improve test stability
- Fix navigation menu display and click issues
- Fix scroll to top/bottom test failures
- Fix section display tests by removing non-existent contact section
- Add data-testid attributes for better test reliability
- Optimize test expectations for scroll behavior
- Add contact page layout for metadata export
- Update section components with proper ARIA attributes
2026-03-07 10:47:14 +08:00
张翔 b7d400ea44 test: add test results analysis script 2026-03-07 07:17:34 +08:00
张翔 c4d135d37e fix: optimize test timeouts and wait conditions for better stability 2026-03-05 23:00:32 +08:00
张翔 c678df44ae fix: improve footer visibility with data-testid and waitForFooter method 2026-03-05 22:53:12 +08:00
张翔 f91f57cbbb fix: improve scrollToSection and skip Contact section test on home page 2026-03-05 22:49:32 +08:00
张翔 44e756aa3b fix: improve scrollToTop implementation and test expectations 2026-03-05 22:14:23 +08:00
张翔 2d6cd79067 fix: add name and data-testid attributes for form input fields 2026-03-05 21:51:50 +08:00
张翔 318081a62a fix: add data-testid attributes for contact page elements 2026-03-05 21:49:12 +08:00
张翔 2f6f6a6aca fix: add navigation role attribute for better test selector 2026-03-05 20:59:25 +08:00
张翔 a3533a8c98 fix: resolve transferSize TypeScript error in mobile performance test 2026-03-05 16:43:04 +08:00
张翔 941e5170e1 fix: resolve remaining TypeScript errors in mobile testing~ 2026-03-05 16:42:16 +08:00
张翔 c4fcbb6059 fix: resolve TypeScript type errors in mobile testing utilities~ 2026-03-05 16:31:47 +08:00
张翔 8bca0e0af4 docs: add mobile testing guide 2026-03-05 16:09:20 +08:00
张翔 94204a1a45 feat: optimize parallel test execution 2026-03-05 16:02:16 +08:00
张翔 597a39d3ec feat: implement HTML report generation in MobileTestReporter 2026-03-05 16:01:27 +08:00
张翔 8a43c0f5c2 feat: create MobileTestReporter base structure 2026-03-05 15:58:25 +08:00
张翔 9e5d61cfed feat: add mobile network environment test suite 2026-03-05 15:50:05 +08:00