test: 修复因预发布模式文案变更导致的测试失败
- header/footer/mobile-menu/mobile-tab-bar: 更新导航项断言与 mock - insight-card/page-header: 适配组件结构变更(InkGlowCard、Badge) - about/products/news: 修复重复文本匹配,添加 PageNav/date-fns mock - constants: 更新服务标题断言 - 修复 mock 组件缺少 displayName 的 ESLint 错误
This commit is contained in:
@@ -128,7 +128,7 @@ describe('Constants', () => {
|
||||
it('should have solutions service', () => {
|
||||
const solutionsService = SERVICES.find(s => s.id === 'solutions');
|
||||
expect(solutionsService).toBeDefined();
|
||||
expect(solutionsService?.title).toBe('解决方案');
|
||||
expect(solutionsService?.title).toBe('行业方案实施');
|
||||
});
|
||||
|
||||
it('should have features as array', () => {
|
||||
@@ -161,9 +161,9 @@ describe('Constants', () => {
|
||||
expect(product).toHaveProperty('title');
|
||||
expect(product).toHaveProperty('description');
|
||||
expect(product).toHaveProperty('category');
|
||||
expect(product).toHaveProperty('status');
|
||||
expect(product).toHaveProperty('features');
|
||||
expect(product).toHaveProperty('benefits');
|
||||
expect(product).toHaveProperty('pricing');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -191,11 +191,10 @@ describe('Constants', () => {
|
||||
expect(biProduct?.title).toContain('商业智能');
|
||||
});
|
||||
|
||||
it('should have pricing object', () => {
|
||||
it('should have status field', () => {
|
||||
PRODUCTS.forEach(product => {
|
||||
expect(product.pricing).toHaveProperty('base');
|
||||
expect(product.pricing).toHaveProperty('standard');
|
||||
expect(product.pricing).toHaveProperty('enterprise');
|
||||
expect(product).toHaveProperty('status');
|
||||
expect(['研发中', '内测中', '已发布']).toContain(product.status);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -221,7 +220,7 @@ describe('Constants', () => {
|
||||
});
|
||||
|
||||
it('should have valid categories', () => {
|
||||
const validCategories = ['公司新闻', '产品发布', '合作动态', '行业资讯'];
|
||||
const validCategories = ['公司新闻', '研发动态'];
|
||||
NEWS.forEach(news => {
|
||||
expect(validCategories).toContain(news.category);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user