Task Summary
frontend/src/app/common/formly/formly-utils.ts (codecov ~16%) has pure helpers over FormlyFieldConfig arrays: getFieldByName, setHideExpression, and the createShouldHideFieldFunc predicate factory. Cover them with Vitest on plain objects (no TestBed). The rxjs createOutputFormChangeEventStream (debounce/distinct/share stream) is out of scope for this issue. See frontend/TESTING.md.
Behavior to cover
getFieldByName(name, fields) — returns the field whose key === name; undefined when no field matches; the first match when several share a key
createShouldHideFieldFunc(...) — the returned predicate:
model is null/undefined -> returns false
- target field value is
null/undefined -> returns hideOnNull
- regex mode -> hides iff the value matches
^(expected)$
- non-regex mode -> hides iff
value.toString() === expected
setHideExpression(toggleHidden, fields, hiddenBy) — sets hideExpression = hiddenBy on each named field that exists; no-op for names not present
Task Type
Task Summary
frontend/src/app/common/formly/formly-utils.ts(codecov ~16%) has pure helpers overFormlyFieldConfigarrays:getFieldByName,setHideExpression, and thecreateShouldHideFieldFuncpredicate factory. Cover them with Vitest on plain objects (noTestBed). The rxjscreateOutputFormChangeEventStream(debounce/distinct/share stream) is out of scope for this issue. Seefrontend/TESTING.md.Behavior to cover
getFieldByName(name, fields)— returns the field whosekey === name;undefinedwhen no field matches; the first match when several share a keycreateShouldHideFieldFunc(...)— the returned predicate:modelisnull/undefined-> returnsfalsenull/undefined-> returnshideOnNull^(expected)$value.toString() === expectedsetHideExpression(toggleHidden, fields, hiddenBy)— setshideExpression = hiddenByon each named field that exists; no-op for names not presentTask Type