Skip to content

fix(settings): a lingering inline range error stays visible after Reset settings or a reload because programmatic value sets do not re-run the validator #642

Closed

Description

@cristim

Found in the review of PR #634 (inline error for an empty global coverage field, merged). The validators from wireInlineRangeValidation only run on the input and blur events, but loadGlobalSettings (frontend/src/settings.ts ~3197) and resetSettings (~3718) set the field value programmatically without firing input, so a lingering error (now easier to reach with an EMPTY coverage field, which is flagged) stays visible with aria-invalid after Reset settings or a reload. Out-of-range values already behaved this way. Also: no test pins that 0 stays a valid coverage value (valid by reading: raw '0' is not '' and 0 is within 0..100).

Acceptance: after a programmatic set (load or reset) the validator re-runs (dispatch input after the sets, or have check() listen to a custom event) and the error clears; jest tests for reset-clears-error and for 0 valid. Frontend tests cannot run offline: wait for CI (Build frontend, Unit Tests). Related: #522, #634.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions