From 66971150c76832b6df8d58ef59f65e1508184ed5 Mon Sep 17 00:00:00 2001 From: KoalaDev <6156589+Shik3i@users.noreply.github.com> Date: Fri, 14 Aug 2026 07:39:41 +0200 Subject: [PATCH] test: cover the popup blacklist UI, tighten audit findings The delta model was only covered at module level; the popup wiring around it was not exercised at all. Seven specs now drive the real settings UI in the packed extension, including the migration path: a pre-v3.1.0 snapshot is converted on open, the legacy key is removed, and a default missing from that snapshot is delivered again. Also from the audit pass: - await the blacklist read in init instead of firing a floating promise - unify the debug report on the finder's own candidate list, which the separate traversal missed shadow-DOM videos from - assert that a single candidate is always returned regardless of its ranking signals, so no scoring signal can regress a single-player site Co-Authored-By: Claude Opus 5 --- extension/content.js | 14 +-- extension/popup.js | 2 +- scripts/test-content-video-finder.cjs | 22 ++++ tests/e2e/extension.spec.mjs | 37 +----- tests/e2e/helpers/extension-fixture.mjs | 87 ++++++++++++++ tests/e2e/popup-blacklist.spec.mjs | 151 ++++++++++++++++++++++++ 6 files changed, 265 insertions(+), 48 deletions(-) create mode 100644 tests/e2e/helpers/extension-fixture.mjs create mode 100644 tests/e2e/popup-blacklist.spec.mjs diff --git a/extension/content.js b/extension/content.js index e5e0db3..5a7228b 100644 --- a/extension/content.js +++ b/extension/content.js @@ -685,16 +685,6 @@ return out; } - // Debug-report counterpart to findVideo(): every