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
This commit is contained in:
张翔
2026-03-07 10:47:14 +08:00
parent b7d400ea44
commit 92af40df8e
17 changed files with 316 additions and 67 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ export function CasesSection() {
const featuredCases = CASES.slice(0, 3);
return (
<section id="cases" className="py-24 bg-white relative overflow-hidden" ref={ref}>
<section id="cases" role="region" aria-labelledby="cases-heading" className="py-24 bg-white relative overflow-hidden" ref={ref}>
<div className="absolute top-1/3 left-0 w-[400px] h-[400px] bg-[rgba(196,30,58,0.03)] rounded-full blur-3xl" />
<div className="absolute top-1/3 right-0 w-[300px] h-[300px] bg-[rgba(196,30,58,0.02)] rounded-full blur-3xl" />
@@ -29,7 +29,7 @@ export function CasesSection() {
transition={{ duration: 0.6 }}
className="text-center max-w-3xl mx-auto mb-16"
>
<h2 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-4">
<h2 id="cases-heading" className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-4">
<span className="text-[#C41E3A]"></span>
</h2>
<p className="text-lg text-[#5C5C5C] max-w-2xl mx-auto">