From abef4e29b8e20ed6a5116ee909eb0ba0e1028bb2 Mon Sep 17 00:00:00 2001 From: Sergey Kozyrenko Date: Wed, 22 Jul 2026 05:58:24 +0700 Subject: [PATCH] test(e2e): fail the contrast probe on an unparseable colour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit paint() set fillStyle to black, then to the requested colour — but an unparseable colour is a silent no-op on fillStyle, leaving black, which measures as a spurious ~21:1 pass. Assign the colour against two different sentinels and throw when it doesn't land on the same value, so a broken colour surfaces the gate instead of clearing it. Co-Authored-By: Claude Opus 4.8 --- frontend/e2e/helpers/contrast.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/frontend/e2e/helpers/contrast.ts b/frontend/e2e/helpers/contrast.ts index 28ab7a76..2723c087 100644 --- a/frontend/e2e/helpers/contrast.ts +++ b/frontend/e2e/helpers/contrast.ts @@ -100,8 +100,21 @@ export const measureContrast = async (page: Page, probe: string): Promise