Skip to content

Commit fcbef2c

Browse files
committed
Compare a11y baseline by violation id only, not by node count
Node counts drift between local Electron-on-macOS and CI headless-Chromium-on-Linux for the same underlying violations, so the count was failing CI on diffs that aren't really diffs. id-only is the conventional baseline shape anyway.
1 parent 09b3a75 commit fcbef2c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

packages/graphiql/cypress/e2e/a11y.cy.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ function checkOrCapture(checkpoint: string) {
4646
} else {
4747
const baselineEntries: ViolationSummary[] =
4848
(baseline as Baseline)[checkpoint] ?? [];
49-
const baselineKeys = new Set(
50-
baselineEntries.map(v => `${v.id}:${v.nodeCount}`),
51-
);
49+
// Compare by violation id only — node counts drift between local
50+
// (Electron on macOS) and CI (headless Chromium on Linux) for the
51+
// same underlying issues, so they're not a reliable key.
52+
const baselineKeys = new Set(baselineEntries.map(v => v.id));
5253
const newViolations = violations.filter(
53-
v => !baselineKeys.has(`${v.id}:${v.nodes.length}`),
54+
v => !baselineKeys.has(v.id),
5455
);
5556
if (newViolations.length > 0) {
5657
const summary = newViolations

0 commit comments

Comments
 (0)