Skip to content

Commit c100d0a

Browse files
author
iexitdev
committed
test(release): add detailed native qa row listing
1 parent 164631e commit c100d0a

3 files changed

Lines changed: 82 additions & 2 deletions

File tree

docs/release/beta-checklist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The `docs:build` command validates local links, balanced code fences, JS/TS mark
5050

5151
The `pack:check` command runs `npm pack --dry-run --json --ignore-scripts` for every package in the release package manifest, using a repo-local temp npm cache. It verifies package names, package metadata, README files, built `dist` entrypoints, and the modern `pro-preview` subpath artifacts. The publish workflow reads the same manifest for the Developer Preview publish list so preview-only packages cannot be published by an unrelated hardcoded loop. Keep dependency packages before the root compatibility package in the manifest so scoped package access failures happen before the root package is published.
5252

53-
Use `npm run release:qa:record -- --matrix runtime --list` to inspect native QA matrix rows, and use the same command with `--row`, `--status`, and `--evidence` after a manual device pass. Use `--matrix skia` for Skia renderer install, parity, and performance evidence. The recorder rejects `pass` rows without evidence links or missing repo-relative evidence files and regenerates [native QA checklist](native-qa-checklists.md).
53+
Use `npm run release:qa:record -- --matrix runtime --list` to inspect native QA matrix rows, and add `--details` to print the required checks for each row. Use the same command with `--row`, `--status`, and `--evidence` after a manual device pass. Use `--matrix skia` for Skia renderer install, parity, and performance evidence. The recorder rejects `pass` rows without evidence links or missing repo-relative evidence files and regenerates [native QA checklist](native-qa-checklists.md).
5454

5555
Use `npm run release:native-workflow:record -- --list` to inspect native release workflow evidence. After a green workflow run, record the run URL, commit, and both platform artifact links with `--run-url`, `--commit`, `--ios-artifact`, and `--android-artifact`.
5656

scripts/record-native-qa-evidence.mjs

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ const parseArgs = (argv) => {
6363

6464
if (arg === "--dry-run") {
6565
options.dryRun = true;
66+
} else if (arg === "--details") {
67+
options.details = true;
6668
} else if (arg === "--evidence") {
6769
options.evidence.push(readValue());
6870
} else if (arg === "--list") {
@@ -151,16 +153,55 @@ const getRowTarget = (matrix, row) => {
151153
.join(" / ");
152154
};
153155

156+
const getRowRequiredCheckGroups = (matrix, row) => {
157+
const page = matrix.pages?.find((item) => item.id === row.pageId);
158+
159+
return Array.isArray(page?.requiredCheckGroups)
160+
? page.requiredCheckGroups
161+
: [];
162+
};
163+
164+
const getRowRequiredChecks = (matrix, row) => {
165+
const requiredCheckGroups = getRowRequiredCheckGroups(matrix, row);
166+
const groupChecks = requiredCheckGroups.flatMap((groupId) => {
167+
const checks = matrix.checkGroups?.[groupId] ?? [];
168+
169+
return checks.map((check) => `${groupId}: ${check}`);
170+
});
171+
const scenario = matrix.scenarios?.find((item) => item.id === row.scenarioId);
172+
const scenarioChecks = [
173+
scenario?.requiredDataSize
174+
? `scenario: data size ${scenario.requiredDataSize}`
175+
: "",
176+
scenario?.interaction
177+
? `scenario: interaction ${scenario.interaction}`
178+
: "",
179+
scenario?.requiredEvidence
180+
? `scenario: evidence ${scenario.requiredEvidence}`
181+
: ""
182+
].filter(Boolean);
183+
const metricChecks = Array.isArray(matrix.metrics)
184+
? matrix.metrics.map((metric) => `metric: ${metric}`)
185+
: [];
186+
187+
return [...groupChecks, ...scenarioChecks, ...metricChecks];
188+
};
189+
154190
export const listNativeQaRows = async ({
191+
includeDetails = false,
155192
matrixName,
156193
repoRoot = defaultRepoRoot
157194
}) => {
158195
const config = getMatrixConfig(matrixName);
159196
const matrix = await readJson(repoRoot, config.path);
160197

161198
return matrix.rows.map((row) => ({
199+
checks: includeDetails ? getRowRequiredChecks(matrix, row) : [],
162200
evidence: row.evidence ?? [],
163201
id: row.id,
202+
requiredCheckGroups: includeDetails
203+
? getRowRequiredCheckGroups(matrix, row)
204+
: [],
164205
status: row.status,
165206
target: getRowTarget(matrix, row)
166207
}));
@@ -265,14 +306,23 @@ const main = async () => {
265306
}
266307

267308
if (options.list) {
268-
const rows = await listNativeQaRows({ matrixName: options.matrix });
309+
const rows = await listNativeQaRows({
310+
includeDetails: options.details,
311+
matrixName: options.matrix
312+
});
269313

270314
for (const row of rows) {
271315
console.log(
272316
`${row.id}\t${row.status}\t${row.target}\t${
273317
row.evidence.length > 0 ? row.evidence.join(", ") : "no evidence"
274318
}`
275319
);
320+
321+
if (options.details) {
322+
for (const check of row.checks) {
323+
console.log(` - ${check}`);
324+
}
325+
}
276326
}
277327

278328
return;

scripts/record-native-qa-evidence.test.mjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,36 @@ describe("native QA evidence recorder", () => {
6060
expect(rows).toHaveLength(16);
6161
});
6262

63+
it("can include required check details for manual QA rows", async () => {
64+
const [runtimeRow] = await listNativeQaRows({
65+
includeDetails: true,
66+
matrixName: "runtime",
67+
repoRoot
68+
});
69+
const [performanceRow] = await listNativeQaRows({
70+
includeDetails: true,
71+
matrixName: "performance",
72+
repoRoot
73+
});
74+
const [skiaRow] = await listNativeQaRows({
75+
includeDetails: true,
76+
matrixName: "skia",
77+
repoRoot
78+
});
79+
80+
expect(runtimeRow).toMatchObject({
81+
id: "ios-line-charts",
82+
requiredCheckGroups: ["global", "line"]
83+
});
84+
expect(runtimeRow.checks).toContain(
85+
"line: tap selection can be enabled without scrub"
86+
);
87+
expect(performanceRow.checks).toContain("metric: initial render time");
88+
expect(skiaRow.checks).toContain(
89+
"scenario: evidence Install optional Skia renderer dependencies, run native release build, and verify the SVG default path still works without static Skia imports."
90+
);
91+
});
92+
6393
it("requires evidence before marking a row as pass", async () => {
6494
await expect(
6595
recordNativeQaEvidence({

0 commit comments

Comments
 (0)