mengw15 opened a new pull request, #6365:
URL: https://github.com/apache/texera/pull/6365

   ### What changes were proposed in this PR?
   
   Add unit test coverage for the pure `FormlyFieldConfig` helpers in 
`frontend/src/app/common/formly/formly-utils.ts` — `getFieldByName`, 
`setHideExpression`, and the `createShouldHideFieldFunc` predicate factory. A 
Vitest spec on plain objects (no `TestBed`). No production-code changes.
   
   The rxjs `createOutputFormChangeEventStream` (debounce/distinct/share 
stream) is out of scope for this issue.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6361. See `frontend/TESTING.md`.
   
   ### How was this PR tested?
   
   ```
   ng test --watch=false --include src/app/common/formly/formly-utils.spec.ts
   ```
   
   9 pass. ESLint and Prettier on the new spec are clean. The spec is pure — it 
builds plain `FormlyFieldConfig` objects (no `TestBed`) and covers: 
`getFieldByName` (match / no-match / first-of-duplicate-keys); 
`setHideExpression` (sets the hide expression on present fields, no-op for 
absent names); and the `createShouldHideFieldFunc` predicate (missing model → 
`false`, null target → `hideOnNull`, anchored regex match, and `equals` via 
`toString()`).
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])
   


-- 
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