wrolpi/app/src
Roland ad0340a420
Some checks are pending
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
test: check declared types, not just field names, and fix the three that were wrong
Greptile's point on #592 was right and generalized further than the case it
raised.  The guard compared property names only, so it passed while the published
contract disagreed with the endpoint about what those properties contain.

Three wrong types, all pre-existing, all now caught by a test:

StatusResponse.downloads was `int` while the handler has always sent the download
manager's summary object -- the spec told a generated client to expect a number
where it gets a dict.  It is now DownloadsSummaryResponse, with the six fields
get_summary() actually returns.

StatusResponse.wrol_mode was `str`; wrol_mode_enabled() returns a bool.

SettingsResponse.log_level was `str` while the handler sends a Python logging
integer -- SettingsRequest.log_level already said int, and the frontend converts
it numerically through fromApiLogLevel(). settingsFixture was carrying 'info',
which that function maps to undefined, so every Settings test has rendered a blank
log-level label where production shows "Info".  The fixture now carries 20.  This
came from the same hand-written cypress body as cpu_percent did.

statusFixture's nested downloads was also short a field: daily_limit_reached, one
the API has always sent.  /api/status returns an empty downloads object while the
database is down, which it is for much of the suite, so the endpoint cannot vouch
for its own nested shape -- get_summary() is the authority and is now compared
directly.

The type check runs against both endpoints rather than only the one the review
named; that is how log_level surfaced.  Comparison is limited to properties the
spec gives a type for and the handler actually sent, since a null from an optional
field says nothing about its declared type.

Fixture values are still compared by name only: they are read from JS source
rather than executed, so their types are not reliably available.  Said plainly in
the test rather than left to look like coverage.

1709 pytest, 986 jest, 46 e2e.  One unrelated flake in one backend run (the known
filename-formatting tests under -nauto), clean across two further full runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 17:34:36 -06:00
..
api controller: VNC toggle, gated on the Desktop running 2026-07-29 18:10:05 -06:00
components test: the theme drives the colour scheme, and mockModule takes the module 2026-07-30 16:44:40 -06:00
contexts test: one place for fixtures, real providers instead of mocked context modules 2026-07-30 16:44:40 -06:00
hooks build: uninstall Semantic UI 2026-07-30 14:50:47 -06:00
themes ui: a browser layer for the library, and the .media reset that never applied 2026-07-30 16:10:56 -06:00
types ui: the last Semantic UI file, and the stylesheet with it 2026-07-30 13:41:05 -06:00
api.js ui: thirty-five files off Semantic, leaving fifteen 2026-07-30 12:54:24 -06:00
App.css test: one place for fixtures, real providers instead of mocked context modules 2026-07-30 16:44:40 -06:00
App.js ui: the last Semantic UI file, and the stylesheet with it 2026-07-30 13:41:05 -06:00
DashboardPage.js ui: thirty-five files off Semantic, leaving fifteen 2026-07-30 12:54:24 -06:00
DashboardPage.test.js ui: thirty-five files off Semantic, leaving fifteen 2026-07-30 12:54:24 -06:00
Events.js ui: thirty-five files off Semantic, leaving fifteen 2026-07-30 12:54:24 -06:00
index.css ui: the last Semantic UI file, and the stylesheet with it 2026-07-30 13:41:05 -06:00
index.js Fixing changes before merge. 2023-02-08 21:18:51 -07:00
logo.svg Renaming examples to avoid grouping of pdf with ebooks. Reworking URLs for media files to avoid escaping url safe characters. 2023-03-29 13:46:39 -06:00
reportWebVitals.js Renaming examples to avoid grouping of pdf with ebooks. Reworking URLs for media files to avoid escaping url safe characters. 2023-03-29 13:46:39 -06:00
semantic-baseline.json ui: the last Semantic UI file, and the stylesheet with it 2026-07-30 13:41:05 -06:00
semantic-baseline.test.js build: uninstall Semantic UI 2026-07-30 14:50:47 -06:00
setupTests.js ui: Common.js and thirteen more files off Semantic 2026-07-30 11:55:39 -06:00
Tags.cy.js Video downloads have many more options. Downloads are migrated. 2024-11-28 09:48:57 -07:00
Tags.js ui: thirty-five files off Semantic, leaving fifteen 2026-07-30 12:54:24 -06:00
test-fixtures.js test: check declared types, not just field names, and fix the three that were wrong 2026-07-30 17:34:36 -06:00
test-fixtures.test.js test: one place for fixtures, real providers instead of mocked context modules 2026-07-30 16:44:40 -06:00
test-utils.js test: the theme drives the colour scheme, and mockModule takes the module 2026-07-30 16:44:40 -06:00
test-utils.test.js test: the theme drives the colour scheme, and mockModule takes the module 2026-07-30 16:44:40 -06:00