You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "mengw15 (via GitHub)" <gi...@apache.org> on 2026/07/20 06:06:40 UTC
[I] add unit test coverage for formly-config validation-message formatters [texera]
mengw15 opened a new issue, #6591:
URL: https://github.com/apache/texera/issues/6591
### Task Summary
`formly-config.ts` (`frontend/src/app/common/formly/formly-config.ts`, codecov ~62%) exports ten pure validation-message formatters used by the Texera formly config, none of which are tested. They are plain functions — no TestBed. Add a spec.
### Behavior to add
Each formatter takes `(err, field)` and returns a message string derived from `field.props?.<limit>`. For each, pass a sample `field` (e.g. `{ props: { minItems: 3 } }`) and assert the exact returned string:
- `minItemsValidationMessage` / `maxItemsValidationMessage`
- `minlengthValidationMessage` / `maxlengthValidationMessage`
- `minValidationMessage` / `maxValidationMessage`
- `exclusiveMinimumValidationMessage` / `exclusiveMaximumValidationMessage`
- `multipleOfValidationMessage`
- `constValidationMessage`
Include a case where the referenced `field.props` value is absent (the message still renders, with `undefined` interpolated) so the optional-chaining branch is covered.
### 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: notifications-unsubscribe@texera.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] add unit test coverage for formly-config validation-message formatters [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6591:
URL: https://github.com/apache/texera/issues/6591#issuecomment-5019258120
<!-- texera:template-compliance -->
👋 Thanks for opening this issue, @mengw15!
It looks like the issue description doesn't quite follow our template yet:
- This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.
Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
You can find the template prompts by editing the description, or see [CONTRIBUTING.md](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) for the full contribution flow.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] add unit test coverage for formly-config validation-message formatters [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan closed issue #6591: add unit test coverage for formly-config validation-message formatters
URL: https://github.com/apache/texera/issues/6591
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org