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/08/16 09:58:28 UTC
[PR] test(frontend): cover the remaining lines and branches in the coeditor icon, venv page, files uploader and preset wrapper [texera]
mengw15 opened a new pull request, #7701:
URL: https://github.com/apache/texera/pull/7701
### What changes were proposed in this PR?
Covers the remaining lines and untaken branches in the four files. All four now
report full line and branch coverage. No production code was changed.
Two of the paths in the issue have moved: `CoeditorUserIconComponent` lives under
`workspace/component/menu/`, and `PresetWrapperComponent` under
`common/formly/`.
**`CoeditorUserIconComponent`** (+5) — the shadowing menu had no test at all
beyond "should create". Both arms of the compound guard now render: shadowing
off, shadowing on for *another* co-editor (the second half flipped on its own),
and shadowing on for this one. Each variant is then clicked, asserting the
presence service receives `shadowCoeditor` / `stopShadowing`.
**`UserVenvComponent`** (+5) — the `"(unnamed)"` fallback on both the confirm
dialog and the delete notification, a record with no `packages`, a stored
version that is nullish rather than empty (only nullish reaches `?? ""`), and a
draft row whose version is null.
**`FilesUploaderComponent`** (+5) — the existing suite constructs the component
with `new`, so the template had never rendered (0% on the .html). A second block
mounts it for real and drives the banner `*ngIf` through all four flag
combinations, its message, its close handler, the drop-zone button and the drop
handler.
**`PresetWrapperComponent`** (+6) — a form control holding a value and holding
`null`, `setupFieldConfig`, the `applyPresetStream` predicate with a matching and
a non-matching event plus the `basePreset` assignment behind it, and the
dropdown's own `nzVisibleChange` output.
Two notes on how the DOM is driven here:
- `nz-dropdown-menu` keeps its content in an ng-template that mounts into a CDK
overlay only when the dropdown opens, which jsdom does not drive. Rather than
assert on the bound data, the tests instantiate that template directly
(`viewContainerRef.createEmbeddedView(templateRef)`), which puts the rows in
the fixture's DOM so the `*ngFor`, the interpolations and the click handlers
all really run. This replaces the data-only assertions the preset spec had for
the same reason.
- `PresetWrapperComponent`'s "does not refresh while the dropdown is closed" test
never awaited the handler's `debounceTime(0)`, so it passed because the
callback had not run yet rather than because the menu was closed — it could not
fail. It now awaits the tick and also asserts the search term is still tracked.
`ngx-file-drop` hands its `openFileSelector` to the content template by
reference, so a spy installed after render is not seen; that test asserts the
effect (the hidden file input is clicked) instead.
### Any related issues, documentation, discussions?
Closes #7700
### How was this PR tested?
Extended unit tests, run locally in `frontend/` (all green; the failure paths
were verified by breaking one assertion per file and confirming all four suites
go red and the run exits non-zero):
```
ng test --watch=false --include <the four specs>
# Test Files 4 passed (4) | Tests 111 passed (111)
prettier --write <specs> # clean
eslint <specs> # clean
```
The coverage report was re-run over the four specs to confirm the gaps cleared —
`coeditor-user-icon.component.{ts,html}`, `user-venv.component.ts`,
`files-uploader.component.{ts,html}` and `preset-wrapper.component.{ts,html}`
each report no unhit line and no partial branch.
### 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): cover the remaining lines and branches in the coeditor icon, venv page, files uploader and preset wrapper [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #7701:
URL: https://github.com/apache/texera/pull/7701
--
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): cover the remaining lines and branches in the coeditor icon, venv page, files uploader and preset wrapper [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7701:
URL: https://github.com/apache/texera/pull/7701#issuecomment-5306857431
<!-- 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:** `@gupta-sahil01`, `@Yicong-Huang`
You can notify them by mentioning `@gupta-sahil01`, `@Yicong-Huang` 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): cover the remaining lines and branches in the coeditor icon, venv page, files uploader and preset wrapper [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7701:
URL: https://github.com/apache/texera/pull/7701#issuecomment-5306884745
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/7701?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.93%. Comparing base ([`363537e`](https://app.codecov.io/gh/apache/texera/commit/363537e0251182472f540079d262599f6cbb5240?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b4040e9`](https://app.codecov.io/gh/apache/texera/commit/b4040e910526e7fa59815cab167342a2c48ac1e6?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 #7701 +/- ##
============================================
+ Coverage 90.87% 90.93% +0.05%
Complexity 4450 4450
============================================
Files 1175 1175
Lines 47140 47140
Branches 5284 5284
============================================
+ Hits 42839 42866 +27
+ Misses 2598 2582 -16
+ Partials 1703 1692 -11
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/7701/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/7701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.00% <ø> (ø)` | | Carriedforward from [363537e](https://app.codecov.io/gh/apache/texera/commit/363537e0251182472f540079d262599f6cbb5240?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/7701/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 [363537e](https://app.codecov.io/gh/apache/texera/commit/363537e0251182472f540079d262599f6cbb5240?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/7701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.37% <ø> (ø)` | | Carriedforward from [363537e](https://app.codecov.io/gh/apache/texera/commit/363537e0251182472f540079d262599f6cbb5240?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/7701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.67% <ø> (ø)` | | Carriedforward from [363537e](https://app.codecov.io/gh/apache/texera/commit/363537e0251182472f540079d262599f6cbb5240?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/7701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.73% <ø> (ø)` | | Carriedforward from [363537e](https://app.codecov.io/gh/apache/texera/commit/363537e0251182472f540079d262599f6cbb5240?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/7701/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 [363537e](https://app.codecov.io/gh/apache/texera/commit/363537e0251182472f540079d262599f6cbb5240?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/7701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `92.44% <ø> (+0.13%)` | :arrow_up: | |
| [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/7701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.74% <ø> (ø)` | | Carriedforward from [363537e](https://app.codecov.io/gh/apache/texera/commit/363537e0251182472f540079d262599f6cbb5240?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/7701/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 [363537e](https://app.codecov.io/gh/apache/texera/commit/363537e0251182472f540079d262599f6cbb5240?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/7701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.19% <ø> (ø)` | | Carriedforward from [363537e](https://app.codecov.io/gh/apache/texera/commit/363537e0251182472f540079d262599f6cbb5240?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/7701?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