fix(tests): enforce screenshot gate; drop shadow dir, flaky retinascale, 12 stale
Finalize the screenshot review system after the first Linux re-baseline (that run showed 355/356 stable — the placeholder floor is fine as-is): - ENFORCE the gate: `screenshots:check --fail-on-change` now fails the build on any changed/added/removed vs baselines (it still posts the drift report first, so the failure is actionable; a real render change → re-promote). The generic "CI failed" notice is suppressed for gate failures so we don't double-post on drift. - Exclude retinascale-01-loaded: a fullPage HiDPI test whose captured height + DPR scaling vary run-to-run (~60% inter-run diff) — a flaky test, not render noise. IGNORE_SCREENSHOTS in config.ts; compare/promote/gen-manifest skip it; baseline removed. - Kill the baseline-dir shadowing: drop e2e/baseline-screenshots/ from BASELINE_DIRS + delete its 3 files (grid-tab-final, wxgrid-controls, wxgrid-dedicated-page) that duplicated names in baseline-screenshots/ with different bytes. - Prune 12 stale baselines (renamed/removed specs: wizard-01..04, gerbview-wizard-01..04, zoom-pl_editor-*, popup-03-palette). - Delete the dead compare-screenshots.sh / update-baseline-screenshots.sh. - Regenerate screenshot-manifest.json (355 entries). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
348596c515
commit
3efcdcf91c
24 changed files with 98 additions and 251 deletions
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { BASELINE_DIRS, MANIFEST_PATH, type Manifest } from './config';
|
||||
import { BASELINE_DIRS, MANIFEST_PATH, isIgnored, type Manifest } from './config';
|
||||
|
||||
const CHROMIUM = 'chromium-swiftshader';
|
||||
const FIREFOX = 'firefox-llvmpipe';
|
||||
|
|
@ -78,7 +78,7 @@ function listBaselines(root: string): string[] {
|
|||
for (const dir of BASELINE_DIRS) {
|
||||
const abs = path.join(root, dir);
|
||||
if (!fs.existsSync(abs)) continue;
|
||||
for (const f of fs.readdirSync(abs)) if (f.toLowerCase().endsWith('.png')) names.add(f);
|
||||
for (const f of fs.readdirSync(abs)) if (f.toLowerCase().endsWith('.png') && !isIgnored(f)) names.add(f);
|
||||
}
|
||||
return [...names].sort();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue