test(09-03): add failing tests for form locale and dropdown options

- The same cached schema must localize pl and en independently, including Accept-Language parent fallback and raw keys
- YAML option maps keep order and scalar type, and a method provider is required at boot
This commit is contained in:
Jakub Zych
2026-09-24 18:20:21 +02:00
parent 4c814e5f63
commit ad1b76085a
3 changed files with 266 additions and 0 deletions

View File

@@ -10,6 +10,19 @@ type FormSchema struct {
Fields []FormField `json:"fields"`
}
// FormView is one request's localized form, including the locale actually used.
type FormView struct {
Name string `json:"name,omitempty"`
ModelClass string `json:"modelClass,omitempty"`
Fields []FormField `json:"fields"`
Meta FormMeta `json:"meta"`
}
// FormMeta reports the locale selected for a schema response.
type FormMeta struct {
Locale string `json:"locale"`
}
// FormField is one Winter field in source order. JSON keys keep Winter spelling.
type FormField struct {
Name string `json:"name"`