mengw15 opened a new issue, #6361:
URL: https://github.com/apache/texera/issues/6361

   ### 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
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to