Files
pulse/tests/integration/scripts/e2e-tier-identity.mjs
T
pulse-triage[bot] 974f102333 Stabilize E2E tier test identity
Treat Playwright source coordinates as presentation metadata so cold transform-cache line mappings cannot split one test across all/stable/probation listings. Pin project, spec, and full-title identity with a focused Node regression.

Change-source: pulse-maintainer
2026-08-29 16:31:54 +01:00

18 lines
664 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const PLAYWRIGHT_LIST_LINE = /^\s*\[([^\]]+)\] › (.+?\.spec\.ts):\d+:\d+ › (.+)$/;
// Playwright's transform cache can report the same test at its authored line
// on one --list process and at a transformed line on the next. Source
// coordinates are presentation metadata, not test identity; tier accounting
// is project + spec + title.
export function parsePlaywrightTestIdentity(rawLine) {
const line = rawLine.replace(/\x1b\[[0-9;]*m/g, '');
const match = line.match(PLAYWRIGHT_LIST_LINE);
if (!match) return null;
const [, project, specFile, title] = match;
return {
key: `[${project}] › ${specFile} › ${title}`,
specFile,
};
}