feat: 添加管理后台页面和功能,优化测试和性能配置

refactor: 重构页面导航和滚动逻辑,提升用户体验

test: 更新测试配置和用例,增加覆盖率和稳定性

perf: 优化性能指标和阈值,适应开发环境需求

ci: 添加Lighthouse CI工作流,集成性能测试

docs: 更新API文档和健康检查端点

fix: 修复登录页面和表单提交问题

style: 调整响应式布局和可访问性改进

chore: 更新依赖项和脚本配置
This commit is contained in:
张翔
2026-03-24 10:11:30 +08:00
parent 08978d38c8
commit f5dec95a83
85 changed files with 12331 additions and 1408 deletions
+12 -5
View File
@@ -113,7 +113,7 @@ class TestResponsive:
home_page.navigate()
# 验证Hero区域可见
hero_visible = home_page._is_visible("#home, .hero-section")
hero_visible = home_page._is_visible("section:first-of-type, [class*='hero']")
if hero_visible:
home_page.logger.info(f"{name} Hero区域正常显示")
@@ -135,7 +135,7 @@ class TestResponsive:
home_page.scroll_to_section("services")
# 检查服务区域可见
home_page.assert_element_visible("#services", timeout=5000)
home_page.assert_element_visible("#services, section:has(h2:has-text('业务')), section:has(h2:has-text('服务'))", timeout=5000)
home_page.logger.info(f"{name} 服务区域正常显示")
@@ -154,7 +154,7 @@ class TestResponsive:
home_page.scroll_to_section("products")
# 检查产品区域可见
home_page.assert_element_visible("#products", timeout=5000)
home_page.assert_element_visible("#products, section:has(h2:has-text('产品'))", timeout=5000)
home_page.logger.info(f"{name} 产品区域正常显示")
@@ -173,7 +173,7 @@ class TestResponsive:
home_page.scroll_to_section("news")
# 检查新闻区域可见
home_page.assert_element_visible("#news", timeout=5000)
home_page.assert_element_visible("#news, section:has(h2:has-text('新闻')), section:has(h2:has-text('动态'))", timeout=5000)
home_page.logger.info(f"{name} 新闻区域正常显示")
@@ -224,7 +224,14 @@ class TestResponsive:
home_page.navigate()
# 滚动检查各个区域
sections = ["#home", "#about", "#services", "#products", "#news", "#contact"]
sections = [
"#home, section:first-of-type",
"#about, section:has(h2:has-text('关于'))",
"#services, section:has(h2:has-text('业务')), section:has(h2:has-text('服务'))",
"#products, section:has(h2:has-text('产品'))",
"#news, section:has(h2:has-text('新闻')), section:has(h2:has-text('动态'))",
"#contact, section:has(h2:has-text('联系')), section:has(h2:has-text('联系方式'))"
]
visible_sections = 0
for section in sections: