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 11:06:56 UTC

[PR] test(frontend): extend UserWorkflowListItemComponent and BrowseSectionComponent coverage [texera]

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

   ### What changes were proposed in this PR?
   
   Extends the existing specs for two components (both asserted little past
   creation) with unit tests for their previously-untested methods, per
   `frontend/TESTING.md`.
   
   **`UserWorkflowListItemComponent`** (codecov ~62%) — 11 new tests:
   - `getProjectIds` returns the entry's project-id set; `isLightColor` reports
     light vs dark hex colors.
   - `confirmUpdateWorkflowCustomName` / `confirmUpdateWorkflowCustomDescription`
     persist via `WorkflowPersistService`, update the workflow, and stop editing;
     the name falls back to the default when empty; both no-op when the workflow
     has no id.
   - `removeWorkflowFromProject` calls `UserProjectService` and prunes the entry's
     project ids; `onClickGetWorkflowExecutions` opens the execution-history modal;
     `onClickDownloadWorkfllow` delegates to `DownloadService` (and no-ops without
     an id).
   
   **`BrowseSectionComponent`** (codecov ~72%) — 4 new tests:
   - `initializeEntry` skips entries whose id is not a number and throws on an
     unexpected entity type.
   - `loadCoverImages` / `getCoverImage` build and cache `${apiEndpoint}/dataset/{id}/cover`
     for a dataset with a cover image, and fall back to the default background otherwise.
   
   No production code was changed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6590
   
   ### How was this PR tested?
   
   Extended Vitest specs, run locally in `frontend/` (each whole file green, run 4×
   to confirm determinism; failure paths verified by breaking an assertion in each):
   
   ```
   ng test --watch=false --include .../user-workflow-list-item.component.spec.ts   # 15 passed
   ng test --watch=false --include .../browse-section.component.spec.ts            # 9 passed
   eslint <specs>     # clean
   prettier --check   # clean
   ```
   
   Services are stubbed (`vi.spyOn` / `useValue`), so the specs make no network
   calls. The list-item tests that mutate a workflow (rename, remove-from-project)
   use a freshly-constructed `DashboardEntry` per test so mutations cannot leak into
   the shared `testWorkflowEntries` fixture.
   
   ### 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): extend UserWorkflowListItemComponent and BrowseSectionComponent coverage [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6604:
URL: https://github.com/apache/texera/pull/6604#issuecomment-5021620931

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - **Contributors with relevant context:** `@Ma77Ball`
     You can notify them by mentioning `@Ma77Ball` in a comment.
   


-- 
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): extend UserWorkflowListItemComponent and BrowseSectionComponent coverage [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6604:
URL: https://github.com/apache/texera/pull/6604#issuecomment-5021725431

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/6604?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 74.03%. Comparing base ([`c543d77`](https://app.codecov.io/gh/apache/texera/commit/c543d7796a027382828648826266a0e45232934c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`ead5f8a`](https://app.codecov.io/gh/apache/texera/commit/ead5f8a4c603648f38bf75ab7c64e4128543fe0e?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    #6604      +/-   ##
   ============================================
   + Coverage     73.98%   74.03%   +0.04%     
     Complexity     3434     3434              
   ============================================
     Files          1157     1157              
     Lines         45621    45621              
     Branches       5031     5031              
   ============================================
   + Hits          33752    33774      +22     
   + Misses        10187    10167      -20     
   + Partials       1682     1680       -2     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/6604/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/6604/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 [c543d77](https://app.codecov.io/gh/apache/texera/commit/c543d7796a027382828648826266a0e45232934c?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/6604/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 [c543d77](https://app.codecov.io/gh/apache/texera/commit/c543d7796a027382828648826266a0e45232934c?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/6604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.78% <ø> (ø)` | | Carriedforward from [c543d77](https://app.codecov.io/gh/apache/texera/commit/c543d7796a027382828648826266a0e45232934c?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/6604/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 [c543d77](https://app.codecov.io/gh/apache/texera/commit/c543d7796a027382828648826266a0e45232934c?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/6604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.66% <ø> (ø)` | | Carriedforward from [c543d77](https://app.codecov.io/gh/apache/texera/commit/c543d7796a027382828648826266a0e45232934c?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/6604/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 [c543d77](https://app.codecov.io/gh/apache/texera/commit/c543d7796a027382828648826266a0e45232934c?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/6604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.22% <ø> (+0.11%)` | :arrow_up: | |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/6604/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 [c543d77](https://app.codecov.io/gh/apache/texera/commit/c543d7796a027382828648826266a0e45232934c?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/6604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `91.79% <ø> (ø)` | | Carriedforward from [c543d77](https://app.codecov.io/gh/apache/texera/commit/c543d7796a027382828648826266a0e45232934c?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/6604/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 [c543d77](https://app.codecov.io/gh/apache/texera/commit/c543d7796a027382828648826266a0e45232934c?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/6604?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): extend UserWorkflowListItemComponent and BrowseSectionComponent coverage [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #6604:
URL: https://github.com/apache/texera/pull/6604


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