Files
pulse/tests/integration/scripts/e2e-tier-identity.test.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

33 lines
1.2 KiB
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.
import assert from 'node:assert/strict';
import test from 'node:test';
import { parsePlaywrightTestIdentity } from './e2e-tier-identity.mjs';
test('tier identity ignores unstable Playwright source coordinates', () => {
const authored = parsePlaywrightTestIdentity(
' [chromium] › 59-workloads-column-layout.spec.ts:148:3 › Workloads column layout › keeps Type readable',
);
const transformed = parsePlaywrightTestIdentity(
' [chromium] › 59-workloads-column-layout.spec.ts:97:3 › Workloads column layout › keeps Type readable',
);
assert.deepEqual(authored, transformed);
assert.deepEqual(authored, {
key: '[chromium] › 59-workloads-column-layout.spec.ts › Workloads column layout › keeps Type readable',
specFile: '59-workloads-column-layout.spec.ts',
});
});
test('tier identity retains project, spec, and complete title path', () => {
assert.equal(parsePlaywrightTestIdentity('unrelated output'), null);
assert.deepEqual(
parsePlaywrightTestIdentity(
'\u001b[2m [mobile-safari] › nested/example.spec.ts:10:7 › suite › test\u001b[22m',
),
{
key: '[mobile-safari] › nested/example.spec.ts › suite › test',
specFile: 'nested/example.spec.ts',
},
);
});