chore(qa): 验收台账与证据入库 + 构建/部署配置同步
- docs/acceptance/qa-tracker.md:跨周期缺陷单一真源台账(§7=第五轮)。 - 周期 1/2 + iPhone SE/axe 验收证据目录、ACCEPTANCE_REVIEW 快照入库。 - 同步 README/CONTEXT/CLAUDE/DESIGN/testing/deployment/lessons-learned 口径; next.config/Dockerfile/nginx/Jenkinsfile/docker-compose/sentry/prisma 对齐 standalone 产物装配与部署形态。
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { test } from '@playwright/test';
|
||||
|
||||
// 只打印、不判定:把「fixture browserName 值」与「真实引擎(userAgent)」两件事分开测,
|
||||
// 因为跳过条件读的是前者,而能力(Touchscreen API)取决于后者。
|
||||
test('probe browserName identity', async ({ browserName, page }, testInfo) => {
|
||||
const ua = await page.evaluate(() => navigator.userAgent);
|
||||
const touchPoints = await page.evaluate(() => 'ontouchstart' in window ? (navigator.maxTouchPoints ?? 0) : -1);
|
||||
console.log(
|
||||
JSON.stringify({
|
||||
project: testInfo.project.name,
|
||||
fixtureBrowserName: browserName,
|
||||
useBrowserName: (testInfo.project.use as { browserName?: string }).browserName ?? null,
|
||||
skipConditionIsTrue: browserName !== 'chromium',
|
||||
ua: ua.slice(0, 90),
|
||||
engine: /AppleWebKit\/.*Version\//.test(ua) && !/Chrome\//.test(ua) ? 'webkit'
|
||||
: /Firefox\//.test(ua) ? 'firefox'
|
||||
: /Chrome\//.test(ua) ? 'chromium' : 'unknown',
|
||||
touchPoints,
|
||||
}),
|
||||
);
|
||||
});
|
||||
@@ -0,0 +1,33 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
// 探针:`chromium-mobile` 项目里 browserName 到底是什么、真正跑的是哪个引擎。
|
||||
// 起因:最终树 28 条 skipped 有 7 条落在 chromium-mobile(cms-workflow ×3 + Touchscreen ×1 + GA4 ×4),
|
||||
// 而跳过条件写成 `browserName !== 'chromium'` ⇒ 该项目内条件为真。
|
||||
export default defineConfig({
|
||||
testDir: __dirname,
|
||||
fullyParallel: true,
|
||||
reporter: [['list']],
|
||||
projects: [
|
||||
{
|
||||
name: 'replica-chromium-mobile',
|
||||
use: {
|
||||
...devices['iPhone 14'],
|
||||
viewport: { width: 390, height: 844 },
|
||||
isMobile: true,
|
||||
hasTouch: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
// 正对照:显式写 browserName,看是否与"仅 spread devices"得到不同的 fixture 值
|
||||
name: 'explicit-chromium-mobile',
|
||||
browserName: 'chromium',
|
||||
use: {
|
||||
...devices['iPhone 14'],
|
||||
viewport: { width: 390, height: 844 },
|
||||
isMobile: true,
|
||||
hasTouch: true,
|
||||
},
|
||||
},
|
||||
{ name: 'plain-desktop', use: { ...devices['Desktop Chrome'] } },
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user