You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Ma77Ball (via GitHub)" <gi...@apache.org> on 2026/05/10 06:41:42 UTC
[PR] add real test cases for PresetWrapperComponent spec [texera]
Ma77Ball opened a new pull request, #5009:
URL: https://github.com/apache/texera/pull/5009
### What changes were proposed in this PR?
Replaces the placeholder/commented-out body of preset-wrapper.component.spec.ts with a real Vitest suite for PresetWrapperComponent, and re-enables the file in angular.json and tsconfig.spec.json (it was previously excluded from the build).
The new suite uses fake PresetService and NzMessageService providers and covers:
- ngOnInit guards: throws when field.key, templateOptions, or presetKey are missing; populates searchResults from getPresets.
- Functional API: applyPreset / deletePreset forward to PresetService with the configured preset key triple; getEntryTitle, getEntryDescription, and the show-all / prefix-match / empty-term / no-match branches of
getSearchResults.
- Dropdown visibility: opening re-fetches presets, closing does not.
- Stream subscriptions: savePresetsStream updates searchResults only when type + target match; valueChanges only refreshes while the menu is open; ngOnDestroy tears down subscriptions.
- savePreset: builds the payload from sibling preset-wrapper fields (ignoring non-preset siblings) and routes valid presets to createPreset; invalid presets surface a toast error.
### Any related issues, documentation, or discussions?
Closes: #4963
### How was this PR tested?
`npx ng test --watch=false --include='src/app/common/formly/preset-wrapper/preset-wrapper.component.spec.ts'` --> 24 tests pass locally under the Vitest runner.
Was this PR authored or co-authored using generative AI tooling?
### Was this PR authored or co-authored using generative AI tooling?
Co-Authored with Claude Opus 4.7 in compliance with ASF.
--
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: [PR] test: add test cases for PresetWrapperComponent spec [texera]
Posted by "chenlica (via GitHub)" <gi...@apache.org>.
chenlica commented on PR #5009:
URL: https://github.com/apache/texera/pull/5009#issuecomment-4414694620
@mengw15 Please review this PR.
--
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: [PR] test: add test cases for PresetWrapperComponent spec [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #5009:
URL: https://github.com/apache/texera/pull/5009
--
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: [PR] test: add test cases for PresetWrapperComponent spec [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5009:
URL: https://github.com/apache/texera/pull/5009#issuecomment-4415205507
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/5009?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 43.36%. Comparing base ([`6f9f0e3`](https://app.codecov.io/gh/apache/texera/commit/6f9f0e355dfba403b5584d0a8703ff58f43b26e0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`641ffd1`](https://app.codecov.io/gh/apache/texera/commit/641ffd14499a60b25ccfded0d6c550956c4c009f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #5009 +/- ##
============================================
+ Coverage 43.22% 43.36% +0.14%
Complexity 2183 2183
============================================
Files 1035 1035
Lines 38818 38818
Branches 4061 4061
============================================
+ Hits 16778 16833 +55
+ Misses 20989 20930 -59
- Partials 1051 1055 +4
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/5009/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| [access-control-service](https://app.codecov.io/gh/apache/texera/pull/5009/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.88% <ø> (ø)` | | Carriedforward from [6f9f0e3](https://app.codecov.io/gh/apache/texera/commit/6f9f0e355dfba403b5584d0a8703ff58f43b26e0?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [agent-service](https://app.codecov.io/gh/apache/texera/pull/5009/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `33.72% <ø> (ø)` | | Carriedforward from [6f9f0e3](https://app.codecov.io/gh/apache/texera/commit/6f9f0e355dfba403b5584d0a8703ff58f43b26e0?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [amber](https://app.codecov.io/gh/apache/texera/pull/5009/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.22% <ø> (ø)` | | Carriedforward from [6f9f0e3](https://app.codecov.io/gh/apache/texera/commit/6f9f0e355dfba403b5584d0a8703ff58f43b26e0?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/5009/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | | Carriedforward from [6f9f0e3](https://app.codecov.io/gh/apache/texera/commit/6f9f0e355dfba403b5584d0a8703ff58f43b26e0?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [config-service](https://app.codecov.io/gh/apache/texera/pull/5009/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | | Carriedforward from [6f9f0e3](https://app.codecov.io/gh/apache/texera/commit/6f9f0e355dfba403b5584d0a8703ff58f43b26e0?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/5009/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `32.10% <ø> (ø)` | | Carriedforward from [6f9f0e3](https://app.codecov.io/gh/apache/texera/commit/6f9f0e355dfba403b5584d0a8703ff58f43b26e0?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [frontend](https://app.codecov.io/gh/apache/texera/pull/5009/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `35.17% <ø> (+0.37%)` | :arrow_up: | |
| [python](https://app.codecov.io/gh/apache/texera/pull/5009/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `88.90% <ø> (ø)` | | Carriedforward from [6f9f0e3](https://app.codecov.io/gh/apache/texera/commit/6f9f0e355dfba403b5584d0a8703ff58f43b26e0?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/5009/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `47.72% <ø> (ø)` | | Carriedforward from [6f9f0e3](https://app.codecov.io/gh/apache/texera/commit/6f9f0e355dfba403b5584d0a8703ff58f43b26e0?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/texera/pull/5009?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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