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/18 22:56:52 UTC
[PR] test(frontend): add unit test coverage for NgbdModalRemoveProjectWorkflowComponent [texera]
mengw15 opened a new pull request, #6525:
URL: https://github.com/apache/texera/pull/6525
### What changes were proposed in this PR?
Adds a Vitest spec for `NgbdModalRemoveProjectWorkflowComponent`
(`frontend/src/app/dashboard/component/user/user-project/user-project-section/ngbd-modal-remove-project-workflow/`),
which had no spec (codecov ~5%). Follows `frontend/TESTING.md` (TestBed +
`detectChanges()`) and mocks `UserProjectService`; the project id is injected via
`NZ_MODAL_DATA`.
13 tests:
- **create / modal data** — renders the template; reads `projectId` from `NZ_MODAL_DATA`.
- **`ngOnInit`** — loads the project's workflows via `retrieveWorkflowsOfProject`
and initializes the checkboxes as unchecked.
- **`isAllChecked`** — false with no workflows; true only when every box is checked.
- **`changeAll`** — checks all when not all are checked, unchecks all when all are,
and is a safe no-op on an empty list.
- **`submitForm`** — calls `removeWorkflowFromProject(projectId, wid)` for each
checked workflow (in the high→low index order the splice loop produces) and
drops the removed entries from the retained `addedWorkflows` cache; does nothing
when nothing is checked; and actually *subscribes* to the removal requests
(a cold-observable double asserts `forkJoin(...).subscribe()` dispatches them).
- **template wiring** — renders a row per workflow and connects the select-all
checkbox `(change)="changeAll()"` and the Confirm button `(click)="submitForm()"`.
No production code was changed.
### Any related issues, documentation, discussions?
Closes #6515
### How was this PR tested?
New Vitest spec, run locally in `frontend/` (all green). Failure paths were
verified by breaking assertions; the subscription test was additionally confirmed
to fail when `forkJoin(...).subscribe()` is removed from the component, so it
guards real dispatch rather than just observable construction.
```
ng test --watch=false --include src/app/dashboard/component/user/user-project/user-project-section/ngbd-modal-remove-project-workflow/ngbd-modal-remove-project-workflow.component.spec.ts
# Test Files 1 passed (1) / Tests 13 passed (13)
eslint <spec> # clean
prettier --check # clean
```
`UserProjectService` is mocked, so the spec makes no network calls.
### 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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): add unit test coverage for NgbdModalRemoveProjectWorkflowComponent [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #6525:
URL: https://github.com/apache/texera/pull/6525
--
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(frontend): add unit test coverage for NgbdModalRemoveProjectWorkflowComponent [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6525:
URL: https://github.com/apache/texera/pull/6525#issuecomment-5013266872
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/6525?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 70.96%. Comparing base ([`39db110`](https://app.codecov.io/gh/apache/texera/commit/39db110e74b4bdcf0e4b0df961c25973e6bbb20c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7ae226a`](https://app.codecov.io/gh/apache/texera/commit/7ae226a5dfdf4311b318b610035b2b4350d514e9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 3 commits behind head on main.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #6525 +/- ##
============================================
+ Coverage 70.57% 70.96% +0.38%
Complexity 3425 3425
============================================
Files 1146 1146
Lines 45062 45078 +16
Branches 4960 4972 +12
============================================
+ Hits 31802 31989 +187
+ Misses 11613 11440 -173
- Partials 1647 1649 +2
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/6525/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/6525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | Carriedforward from [39db110](https://app.codecov.io/gh/apache/texera/commit/39db110e74b4bdcf0e4b0df961c25973e6bbb20c?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/6525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `76.76% <ø> (ø)` | | Carriedforward from [39db110](https://app.codecov.io/gh/apache/texera/commit/39db110e74b4bdcf0e4b0df961c25973e6bbb20c?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/6525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.72% <ø> (ø)` | | Carriedforward from [39db110](https://app.codecov.io/gh/apache/texera/commit/39db110e74b4bdcf0e4b0df961c25973e6bbb20c?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/6525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `17.72% <ø> (ø)` | | Carriedforward from [39db110](https://app.codecov.io/gh/apache/texera/commit/39db110e74b4bdcf0e4b0df961c25973e6bbb20c?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/6525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.30% <ø> (ø)` | | Carriedforward from [39db110](https://app.codecov.io/gh/apache/texera/commit/39db110e74b4bdcf0e4b0df961c25973e6bbb20c?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/6525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.80% <ø> (ø)` | | Carriedforward from [39db110](https://app.codecov.io/gh/apache/texera/commit/39db110e74b4bdcf0e4b0df961c25973e6bbb20c?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/6525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.27% <ø> (+0.90%)` | :arrow_up: | |
| [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/6525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.94% <ø> (ø)` | | Carriedforward from [39db110](https://app.codecov.io/gh/apache/texera/commit/39db110e74b4bdcf0e4b0df961c25973e6bbb20c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/6525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `91.74% <ø> (ø)` | | Carriedforward from [39db110](https://app.codecov.io/gh/apache/texera/commit/39db110e74b4bdcf0e4b0df961c25973e6bbb20c?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/6525/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.14% <ø> (ø)` | | Carriedforward from [39db110](https://app.codecov.io/gh/apache/texera/commit/39db110e74b4bdcf0e4b0df961c25973e6bbb20c?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 Harness](https://app.codecov.io/gh/apache/texera/pull/6525?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
Re: [PR] test(frontend): add unit test coverage for NgbdModalRemoveProjectWorkflowComponent [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6525:
URL: https://github.com/apache/texera/pull/6525#issuecomment-5013251284
<!-- texera-reviewer-suggestion -->
### Automated Reviewer Suggestions
Based on the `git blame` history of the changed files, we recommend the following reviewers:
- No candidates found from `git blame` history.
--
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