test(qa): e2e 装配修正 + 集成/门禁测试与工具链重构
- e2e:修死选择器与蜜罐误命中、补断言、GA4/security-headers 用例诚实标注 skip 边界;新增 assert-helpers/fixtures/hydrated/primary-nav/touch-targets 等复用桩。 - 集成层:config/test/jest.integration.config.js + tests-integration/ 真库 一次性 SQLite 用例,teardown 守卫开发库指纹。 - 门禁工具链:jest.setup 归位到根、scripts/accessibility 全站 axe 节点计数、 check-brand-text-token/check-motion-constraints 机械守卫、stryker/lighthouse 配置收敛。
This commit is contained in:
@@ -2,16 +2,18 @@
|
||||
"ci": {
|
||||
"collect": {
|
||||
"numberOfRuns": 3,
|
||||
"startServerCommand": "npm run start",
|
||||
"startServerCommand": "HOSTNAME=localhost PORT=3200 node dist/standalone/server.js",
|
||||
"startServerReadyPattern": "Local:",
|
||||
"url": [
|
||||
"http://localhost:3000/",
|
||||
"http://localhost:3000/about",
|
||||
"http://localhost:3000/services",
|
||||
"http://localhost:3000/products",
|
||||
"http://localhost:3000/cases",
|
||||
"http://localhost:3000/news",
|
||||
"http://localhost:3000/contact"
|
||||
"http://localhost:3200/",
|
||||
"http://localhost:3200/about",
|
||||
"http://localhost:3200/services",
|
||||
"http://localhost:3200/products",
|
||||
"http://localhost:3200/cases",
|
||||
"http://localhost:3200/news",
|
||||
"http://localhost:3200/contact",
|
||||
"http://localhost:3200/products/erp-upgrade",
|
||||
"http://localhost:3200/about/brand"
|
||||
],
|
||||
"settings": {
|
||||
"preset": "desktop",
|
||||
@@ -34,14 +36,75 @@
|
||||
"largest-contentful-paint": ["error", {"maxNumericValue": 3000}],
|
||||
"cumulative-layout-shift": ["error", {"maxNumericValue": 0.1}],
|
||||
"total-blocking-time": ["error", {"maxNumericValue": 300}],
|
||||
"speed-index": ["error", {"maxNumericValue": 3000}]
|
||||
"speed-index": ["error", {"maxNumericValue": 3000}],
|
||||
|
||||
"inspector-issues": ["error", {"minScore": 1}],
|
||||
|
||||
"aria-allowed-attr": ["error", {"minScore": 1}],
|
||||
"aria-hidden-body": ["error", {"minScore": 1}],
|
||||
"aria-required-attr": ["error", {"minScore": 1}],
|
||||
"aria-required-children": ["error", {"minScore": 1}],
|
||||
"aria-required-parent": ["error", {"minScore": 1}],
|
||||
"aria-roles": ["error", {"minScore": 1}],
|
||||
"aria-valid-attr": ["error", {"minScore": 1}],
|
||||
"aria-valid-attr-value": ["error", {"minScore": 1}],
|
||||
"duplicate-id-aria": ["error", {"minScore": 1}],
|
||||
"button-name": ["error", {"minScore": 1}],
|
||||
"image-alt": ["error", {"minScore": 1}],
|
||||
"input-button-name": ["error", {"minScore": 1}],
|
||||
"input-image-alt": ["error", {"minScore": 1}],
|
||||
"label": ["error", {"minScore": 1}],
|
||||
"select-name": ["error", {"minScore": 1}],
|
||||
"meta-refresh": ["error", {"minScore": 1}],
|
||||
"meta-viewport": ["error", {"minScore": 1}],
|
||||
"video-caption": ["error", {"minScore": 1}],
|
||||
|
||||
"accesskeys": ["error", {"minScore": 1}],
|
||||
"aria-command-name": ["error", {"minScore": 1}],
|
||||
"aria-conditional-attr": ["error", {"minScore": 1}],
|
||||
"aria-hidden-focus": ["error", {"minScore": 1}],
|
||||
"aria-input-field-name": ["error", {"minScore": 1}],
|
||||
"aria-meter-name": ["error", {"minScore": 1}],
|
||||
"aria-progressbar-name": ["error", {"minScore": 1}],
|
||||
"aria-prohibited-attr": ["error", {"minScore": 1}],
|
||||
"aria-toggle-field-name": ["error", {"minScore": 1}],
|
||||
"bypass": ["error", {"minScore": 1}],
|
||||
"color-contrast": ["error", {"minScore": 1}],
|
||||
"definition-list": ["error", {"minScore": 1}],
|
||||
"dlitem": ["error", {"minScore": 1}],
|
||||
"document-title": ["error", {"minScore": 1}],
|
||||
"frame-title": ["error", {"minScore": 1}],
|
||||
"html-has-lang": ["error", {"minScore": 1}],
|
||||
"html-lang-valid": ["error", {"minScore": 1}],
|
||||
"link-in-text-block": ["error", {"minScore": 1}],
|
||||
"link-name": ["error", {"minScore": 1}],
|
||||
"list": ["error", {"minScore": 1}],
|
||||
"listitem": ["error", {"minScore": 1}],
|
||||
"object-alt": ["error", {"minScore": 1}],
|
||||
"tabindex": ["error", {"minScore": 1}],
|
||||
"target-size": ["error", {"minScore": 1}],
|
||||
"td-headers-attr": ["error", {"minScore": 1}],
|
||||
"th-has-data-cells": ["error", {"minScore": 1}],
|
||||
"valid-lang": ["error", {"minScore": 1}],
|
||||
|
||||
"heading-order": ["error", {"minScore": 1}],
|
||||
"form-field-multiple-labels": ["warn", {"minScore": 1}],
|
||||
"html-xml-lang-mismatch": ["warn", {"minScore": 1}],
|
||||
"landmark-one-main": ["warn", {"minScore": 1}],
|
||||
"skip-link": ["warn", {"minScore": 1}],
|
||||
"aria-deprecated-role": ["warn", {"minScore": 1}],
|
||||
"aria-dialog-name": ["warn", {"minScore": 1}],
|
||||
"aria-text": ["warn", {"minScore": 1}],
|
||||
"aria-treeitem-name": ["warn", {"minScore": 1}]
|
||||
}
|
||||
},
|
||||
"upload": {
|
||||
"target": "temporary-public-storage"
|
||||
"target": "filesystem",
|
||||
"outputDir": "lighthouse-reports",
|
||||
"reportFilenamePattern": "%%PATHNAME%%-%%DATETIME%%.report.%%EXTENSION%%"
|
||||
},
|
||||
"settings": {
|
||||
"output": "html",
|
||||
"output": ["html", "json"],
|
||||
"outputPath": "lighthouse-reports"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user