From a60c4a616aa1c8f83f1c678889173658d868e49c Mon Sep 17 00:00:00 2001 From: clawbot Date: Mon, 17 Aug 2026 09:14:59 +0200 Subject: [PATCH] test: drive the Settings screen in a browser and guard every popup element id (closes #229) --- README.md | 35 ++++ TODO.md | 28 +++ src/popup/views/settings.js | 21 +-- tests/e2e/run.js | 328 ++++++++++++++++++++++++++++++++++ tests/popupElementIds.test.js | 182 +++++++++++++++++++ 5 files changed, 581 insertions(+), 13 deletions(-) create mode 100644 tests/popupElementIds.test.js diff --git a/README.md b/README.md index b2a5d2d..747cc59 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,23 @@ fixtures in `tests/e2e/network.js`, so the run is deterministic and fully offline; unrecognised outbound requests are reported as failures rather than silently allowed. +It also covers the **Settings screen**, which holds the densest run of element +id lookups in the codebase and where one wrong id leaves the whole popup blank +rather than only degrading Settings: that the screen renders populated — the +About well and the wallet list are read back, so a `show()` that stopped early +is caught rather than merely a view that failed to appear — that the four Token +Spam Protection controls are real checkboxes defaulted on, and that the theme +and network selectors offer exactly the choices `src/shared/networks.js` and +`index.html` define. What the selectors persist is then driven through the UI to +`dark` and `sepolia` and reasserted after a popup reopen before being restored +the same way; neither value is its selector's first `