Repository navigation
test(ui): derive the settings field count from the schema - #12901
Merged
Merged
Conversation
The settings page spec hard-coded 58 fields. Each new setting broke it, most recently max_concurrent_backend_operations, which made the page list 59. Compare the grouped keys with the schema keys instead, so a failure names the field that is in no group or shown twice. Add the new setting to the mocked settings payload. Assisted-by: Claude:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The settings page UI spec (
core/http/react-ui/e2e/settings-page.spec.js) hard-coded the number of settings (58). Every new setting broke it. The last one wasmax_concurrent_backend_operations(#12888), which made the page list 59, so "every real field sits in exactly one group" fails onmaster.The spec now takes the list of settings from
settingsSchema.jsand compares it by name with what the page shows. A failure now names the setting that is shown but not in the schema, or in the schema but in no group, and the count and the search label follow the schema. The mocked settings payload also gets the new setting.Notes for Reviewers
RuntimeSettingshas 6 JSON keys with no schema entry (single_backend,logo_file,logo_horizontal_file,favicon_file,mitm_listen,pii_default_detectors).mitm_listenandpii_default_detectorsare saved from the Middleware page. I did not touch them; the spec compares against the schema, not the registry.Signed commits
🤖 Generated with Claude Code