test(e2e,unit): add navigation edge cases and component coverage

- Add missing-paths E2E spec for desktop/mobile navigation and contrast
- Add local Playwright config for dev server testing
- Expand unit tests for CMS data server, products, contact and UI components
- Adjust jest config for new test patterns
This commit is contained in:
张翔
2026-07-08 14:47:07 +08:00
parent 7f36211342
commit a6ea2cc72c
11 changed files with 1693 additions and 34 deletions
+2 -4
View File
@@ -248,11 +248,10 @@ describe('ProductCard', () => {
});
describe('ServiceCard', () => {
it('should render number, title, description and link', async () => {
it('should render title, description and link', async () => {
const { ServiceCard } = await import('./service-card');
render(
<ServiceCard
number="01"
title="战略咨询"
description="业务诊断与战略规划"
href="/services/consulting"
@@ -268,7 +267,6 @@ describe('ServiceCard', () => {
const { ServiceCard } = await import('./service-card');
render(
<ServiceCard
number="02"
title="Data"
description="Analysis"
href="/services/data"
@@ -280,7 +278,7 @@ describe('ServiceCard', () => {
expect(target).toBeTruthy();
});
it('should apply custom color', async () => {
it('should accept optional number and color props for compatibility', async () => {
const { ServiceCard } = await import('./service-card');
render(
<ServiceCard