chore: sync marketing pages, CMS extensions, tests and project docs
同步工作区剩余变更,主要包括: - 营销页面组件与布局持续优化(about/news/services/solutions/team 等) - 详情页四层叙事组件、布局组件、UI 组件调整 - CMS 数据模型、API 路由、权限、工作流、站内通知、媒体管理扩展 - 新增/补充单元测试与 E2E 测试(cms-workflow.spec.ts 等) - ESLint 9 迁移、jest/tsconfig 配置更新、依赖调整 - 新增 ADR、CMS 评估文档、Release Review / Acceptance 报告 - 移除水墨装饰组件与大体积未使用字体文件
This commit is contained in:
@@ -118,9 +118,6 @@ test.describe('P1: 品牌视觉审计 - 全站文本扫描', () => {
|
||||
|
||||
// 检查是否包含禁止的文本
|
||||
if (FORBIDDEN_TEXT.test(pageText)) {
|
||||
// 如果匹配到,需要进一步确认是否在允许的上下文中
|
||||
const matches = pageText.match(FORBIDDEN_TEXT) || [];
|
||||
|
||||
// 获取所有包含 novalon 的元素进行详细检查
|
||||
const elementsWithForbiddenText = await page.evaluate(() => {
|
||||
const results: Array<{
|
||||
@@ -329,7 +326,7 @@ test.describe('P1: 品牌视觉审计 - 关键位置验证', () => {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// 忽略单个选择器的错误,继续尝试下一个
|
||||
continue;
|
||||
}
|
||||
@@ -667,7 +664,7 @@ test.describe('P1: 品牌视觉审计 - 响应式布局验证', () => {
|
||||
if (await logo.count() > 0) {
|
||||
try {
|
||||
await expect(logo).toBeVisible({ timeout: 2000 });
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// 某些小屏幕下 Logo 可能不可见,这是可接受的
|
||||
console.log(`Warning: Logo not visible in ${name} viewport`);
|
||||
}
|
||||
@@ -691,7 +688,7 @@ test.describe('P1: 品牌视觉审计 - 特殊场景覆盖', () => {
|
||||
|
||||
test('404 错误页面品牌显示正常', async ({ page }) => {
|
||||
// 访问一个不存在的页面
|
||||
const response = await safeGoto(page, '/nonexistent-page-12345')
|
||||
await safeGoto(page, '/nonexistent-page-12345')
|
||||
.then(() => true)
|
||||
.catch(() => false);
|
||||
|
||||
@@ -772,7 +769,7 @@ test.describe('P1: 品牌视觉审计 - 性能与截图基线', () => {
|
||||
const logo = page.locator('header img, header svg, [data-testid="logo"]').first();
|
||||
try {
|
||||
await logo.waitFor({ state: 'visible', timeout: 10000 });
|
||||
} catch (e) {
|
||||
} catch {
|
||||
console.log('Logo not visible within 10s - may use different structure');
|
||||
// Logo 可能使用了非标准结构,继续测试
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user