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/26 10:25:05 UTC
[PR] test: unit tests for LandingPageComponent [texera]
Ma77Ball opened a new pull request, #5234:
URL: https://github.com/apache/texera/pull/5234
### What changes were proposed in this PR?
- Add `landing-page.component.spec.ts` covering creation, the constructor's `userChanged()` subscription (login/logout transitions update `isLogin` and `currentUid`), `ngOnInit` calling both `getWorkflowCount` and `loadTops`, count population from `HubService.getCount`, the three top-loved buckets populated by `loadTops`, the `loadTops` error path logging via `console.error`, `getTopLovedEntries` enriching items via `SearchService.extendSearchResultsWithHubActivityInfo(items, true, ["access"])` per action and returning a map keyed by action, and `navigateToSearch` routing for `"workflow"`, `"dataset"`, and unknown types.
- Stub `HubService`, `SearchService`, `WorkflowPersistService`, and `DatasetService`; reuse `StubUserService` for a real `userChanged()` subject; replace `Router.navigate` with a vitest spy.
### Any related issues, documentation, or discussions?
Closes: #5225
### How was this PR tested?
- Ran `yarn ng test --watch=false --include='src/app/hub/component/landing-page/landing-page.component.spec.ts'`, 10/10 tests pass.
- Ran `yarn format:fix` (1 file formatted, 505 unchanged).
### 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: unit tests for LandingPageComponent [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang merged PR #5234:
URL: https://github.com/apache/texera/pull/5234
--
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: unit tests for LandingPageComponent [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on PR #5234:
URL: https://github.com/apache/texera/pull/5234#issuecomment-4549245642
/request-review @aicam
--
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: unit tests for LandingPageComponent [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5234:
URL: https://github.com/apache/texera/pull/5234#issuecomment-4550711210
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/5234?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 48.63%. Comparing base ([`8a7366f`](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c0b83c2`](https://app.codecov.io/gh/apache/texera/commit/c0b83c2dff783ca451b68218f19435f829a86434?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 #5234 +/- ##
============================================
+ Coverage 48.57% 48.63% +0.05%
Complexity 2379 2379
============================================
Files 1042 1044 +2
Lines 39971 40037 +66
Branches 4252 4257 +5
============================================
+ Hits 19415 19471 +56
- Misses 19410 19415 +5
- Partials 1146 1151 +5
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/5234/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/5234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.53% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `33.76% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `51.58% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5234/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 [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5234/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 [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `37.99% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.20% <ø> (+0.17%)` | :arrow_up: | |
| [python](https://app.codecov.io/gh/apache/texera/pull/5234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.46% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.81% <ø> (ø)` | | Carriedforward from [8a7366f](https://app.codecov.io/gh/apache/texera/commit/8a7366f3b1ec18fc118a92b76326c06b92be1ff3?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/5234?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>
- :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