You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/08/14 08:49:42 UTC

[PR] test(frontend): render the hub search result with its real children [texera]

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

   ### What changes were proposed in this PR?
   
   `hub-search-result.component.html` reported **0 of 23 lines, 0 of 8 branches and 0 of 3 functions** covered, behind a 17-test spec. That is the attribution loss from #7458, not an untested template: the spec swaps its four children for same-selector stubs via `TestBed.overrideComponent`, and any override re-JITs the component from its decorator metadata, leaving the recompiled template with no source map back to the `.html`.
   
   Adds a `describe` block that renders the component with its **real** children:
   
   | | Before | After |
   |---|---|---|
   | lines | 0/23 | **23/23** |
   | branches | 0/8 | **8/8** |
   | functions | 0/3 | **3/3** |
   
   The block keeps its own `TestBed`, so the 17 existing tests keep their stubs and assertions untouched. Same remedy as merged PRs #7535, #7627 and #7629 — this is the last of the six templates #7458 identified, bar `workspace` and the `user-project` one that the project-feature removal deletes.
   
   Covered: the real children resolving rather than the stub selectors, the dataset-only view toggle and its absence for workflows, which toggle button is highlighted, the sort options shown and hidden per search type, the sort handler's two halves, the card template and its `viewMode` guard, and the three inputs handed to the results list.
   
   ### Verification
   
   23 mutations applied and reverted, production diff empty each time.
   
   **Two then turned out to survive, and the cause is worth recording.** The view-toggle helper read each button as `classList.contains("ant-btn-primary")`, which pins a ternary's *true* leg only — so changing the false leg from `'default'` to `'dashed'` or `'link'` shipped green. The build's own mutations replaced the whole ternary with a constant, which flips the primary leg and dies, which is exactly why the gap was missed.
   
   The helper now reads the type by **name**, matched against the nzType names rather than any `ant-btn-*` class, since the buttons also carry `ant-btn-icon-only` — my first attempt at the fix picked that modifier up and failed loudly, which is how I found it.
   
   All three are now red, each on the intended test rather than merely somewhere in the suite:
   
   | Mutation | Result | Failing test |
   |---|---|---|
   | list button's false leg → `dashed` | red | "highlights whichever view-toggle button matches…" |
   | card button's false leg → `link` | red | same |
   | list button collapsed to a constant (control) | red | same |
   
   ### Deliberately not included
   
   A static `nzTheme="outline"` attribute carries no lcov line and is not asserted.
   
   No production file is touched.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7660
   
   ### How was this PR tested?
   
   ```
   npx ng test --watch=false --include="**/hub-search-result.component.spec.ts"
   ```
   
   ```
    Test Files  1 passed (1)
         Tests  27 passed (27)
   ```
   
   10 new on top of the existing 17. Coverage re-measured by reverting the spec, running with `--coverage`, and restoring. `yarn format:ci` passes.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 5)
   


-- 
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): render the hub search result with its real children [texera]

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

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


Re: [PR] test(frontend): render the hub search result with its real children [texera]

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

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/7661?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 90.19%. Comparing base ([`324278e`](https://app.codecov.io/gh/apache/texera/commit/324278eba8ad915a62c0736936ca368aee59b020?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`29dc150`](https://app.codecov.io/gh/apache/texera/commit/29dc150affcf4dd41f3aa8a1eaf11bf9cf5b009d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on main.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main    #7661      +/-   ##
   ============================================
   + Coverage     90.14%   90.19%   +0.05%     
     Complexity     4417     4417              
   ============================================
     Files          1174     1174              
     Lines         46964    46964              
     Branches       5262     5262              
   ============================================
   + Hits          42334    42360      +26     
   + Misses         2876     2850      -26     
     Partials       1754     1754              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/7661/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/7661/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 [324278e](https://app.codecov.io/gh/apache/texera/commit/324278eba8ad915a62c0736936ca368aee59b020?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/7661/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.62% <ø> (ø)` | | Carriedforward from [324278e](https://app.codecov.io/gh/apache/texera/commit/324278eba8ad915a62c0736936ca368aee59b020?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/7661/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.74% <ø> (ø)` | | Carriedforward from [324278e](https://app.codecov.io/gh/apache/texera/commit/324278eba8ad915a62c0736936ca368aee59b020?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/7661/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `72.46% <ø> (ø)` | | Carriedforward from [324278e](https://app.codecov.io/gh/apache/texera/commit/324278eba8ad915a62c0736936ca368aee59b020?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/7661/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.31% <ø> (ø)` | | Carriedforward from [324278e](https://app.codecov.io/gh/apache/texera/commit/324278eba8ad915a62c0736936ca368aee59b020?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/7661/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.90% <ø> (ø)` | | Carriedforward from [324278e](https://app.codecov.io/gh/apache/texera/commit/324278eba8ad915a62c0736936ca368aee59b020?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/7661/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `91.57% <ø> (+0.12%)` | :arrow_up: | |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/7661/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.89% <ø> (ø)` | | Carriedforward from [324278e](https://app.codecov.io/gh/apache/texera/commit/324278eba8ad915a62c0736936ca368aee59b020?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/7661/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `97.57% <ø> (ø)` | | Carriedforward from [324278e](https://app.codecov.io/gh/apache/texera/commit/324278eba8ad915a62c0736936ca368aee59b020?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/7661/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.89% <ø> (ø)` | | Carriedforward from [324278e](https://app.codecov.io/gh/apache/texera/commit/324278eba8ad915a62c0736936ca368aee59b020?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/7661?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): render the hub search result with its real children [texera]

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


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