wrolpi/app/src/components/admin
Roland 2ce7601ebb
test: act on review — the browser test named LoadStatistic but never mounted it
The suite was titled "a load reading ranks itself", commented as covering the
thresholds, and cross-referenced from Common.test.js as the place the painted
result is checked.  It mounted a hand-built `<Statistic color='warning'/>`.

So it proved that role tokens resolve distinctly -- which the roles suite two
blocks up already covers -- and would have stayed green with LoadStatistic
reverted to `orange`/`red`.  The same shape as the column-border test in #609:
a claim that outran its measurement.  It mounts the real helper at the real
thresholds now, and the reversion fails it.

The source guards are gone.  They scraped function bodies out of files with
indexOf slices, covered two helpers, and never executed a branch.  `loadRole`
and `healthRole` are pure exported functions instead, tested as mappings:
either side of both load thresholds, every SMART assessment, lower case (the
value comes from smartctl), and the case that matters most -- an unreadable
drive must report as unknown, never as healthy.

That is also the better answer to the jsdom problem that produced the guards.
jsdom rejects `color: var(--danger)` and drops it, so the mapping cannot be read
back off a rendered component; extracting it is the honest fix rather than
asserting on source text.

And the gallery was itself half-migrated: 15 Min. Load became `danger` while
5 Min. Load stayed `orange` -- in the one sample whose caption tells the reader
to go and check night and amber, where orange is byte-identical to --text.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 18:05:46 -06:00
..
AdminRoute.js Creating browser extension to facilitate starting downloads. Chrome/Brave and Firefox supported. 2026-05-03 11:48:50 -06:00
browserDetect.js app: treat pure Chromium UA as supported for extension banner 2026-07-18 13:52:26 -06:00
Configs.js ui: route genuine success and failure through the roles 2026-08-08 18:05:46 -06:00
ControllerPage.js test: act on review — the browser test named LoadStatistic but never mounted it 2026-08-08 18:05:46 -06:00
ControllerPage.test.js ui: migrate ControllerPage.js off Semantic UI onto the token component library 2026-08-08 18:04:03 -06:00
Downloads.js ui: route genuine success and failure through the roles 2026-08-08 18:05:46 -06:00
Downloads.test.js Adding selection to the Downloads page, user can delete or retry multiple downloads at once. 2025-12-26 10:35:30 -07:00
ExtensionInstallSuggestion.js ui: migrate the extension pages and Configs; five components they needed 2026-08-08 18:04:00 -06:00
ExtensionInstallSuggestion.test.js app: treat pure Chromium UA as supported for extension banner 2026-07-18 13:52:26 -06:00
ExtensionPage.js ui: migrate the extension pages and Configs; five components they needed 2026-08-08 18:04:00 -06:00
ExtensionPage.test.js Creating browser extension to facilitate starting downloads. Chrome/Brave and Firefox supported. 2026-05-03 11:48:50 -06:00
Settings.js ui: name the directory fields, announce their help text, let long prefixes shrink 2026-08-08 18:04:04 -06:00
Status.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-08 18:04:01 -06:00