From 9e053225312a616df5ce7f04dfe2783c0d79a8a1 Mon Sep 17 00:00:00 2001 From: Youssef Toufik Date: Mon, 27 Apr 2026 21:05:56 +0100 Subject: [PATCH] test(transparency): paint body background in fixture so it actually fails on the base SHA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per Miguel's review: the previous fixture had no body / root background, so it passed against both the buggy and fixed code. The fix this PR makes (the initTransparentBackground stylesheet injection in initializeSession) only matters when a composition paints over the CDP default-background-color override — exactly what we tell users not to do, but exactly what a regression test must do. Reproduced locally: - base SHA (2935be6): pixel (10,10) decodes as rgba [16,16,16,255] (opaque #111 body bg leaks through the pre-navigation override that Chrome resets on goto) - this head: pixel (10,10) decodes as rgba [0,0,0,0] (initTransparentBackground injects [data-composition-id]{background:transparent !important} AFTER navigation, force-overriding the body bg) The pixel-level assertions in transparency-test.ts are unchanged — they already require alpha=0 at (10,10). With the body bg painted, that assertion now fails on any code path that doesn't actually preserve alpha end-to-end. --- .../transparency-regression/src/index.html | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/producer/tests/transparency-regression/src/index.html b/packages/producer/tests/transparency-regression/src/index.html index 8891f82bc..526c671b6 100644 --- a/packages/producer/tests/transparency-regression/src/index.html +++ b/packages/producer/tests/transparency-regression/src/index.html @@ -2,17 +2,26 @@