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/05 03:26:32 UTC
[PR] test(frontend): cover the files-uploader restart branches [texera]
aglinxinyuan opened a new pull request, #7322:
URL: https://github.com/apache/texera/pull/7322
### What changes were proposed in this PR?
The files-uploader's conflict dialog offers **Resume** and **Restart**, and the existing spec only ever took the Resume half — leaving `Restart`, `Restart For All` and `markForceRestart` untested.
The two choices differ by exactly one observable:
```
Resume -> item.restart stays unset -> uploader continues the existing multipart session
Restart -> item.restart = true -> uploader calls the backend with type=forceRestart
```
So a Resume/Restart mix-up silently resumes a session the user explicitly asked to discard, and nothing fails.
Five tests:
| Case | What it pins |
|---|---|
| Restart sets the flag | the single-file restart branch |
| Resume leaves it unset | written as the pair, so a `markForceRestart` wrongly added to Resume is caught too |
| `Restart For All` | the flag reaches files that **never prompted** — the latch applies the restart, it does not merely suppress the dialog |
| `Resume For All` | must **not** set the flag, distinguishing the two latches |
| non-conflicting file | passes straight through, no dialog at all |
Both restart assertions were checked by mutation: dropping `markForceRestart` from the corresponding branch turns each red. Reverted afterwards, and the component diff is empty.
These are additions to the spec's existing harness — it already captures modal configs and clicks their footer buttons by label — not new infrastructure.
No production file is touched.
### Any related issues, documentation, discussions?
Closes #7320
### How was this PR tested?
```
npx ng test --watch=false --include="**/files-uploader.component.spec.ts"
```
```
✓ src/app/dashboard/component/user/files-uploader/files-uploader.component.spec.ts (13 tests)
Test Files 1 passed (1)
```
`yarn format:ci` passes (prettier-eslint + eslint), which Vitest does not cover on its own.
### 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): cover the files-uploader restart branches [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7322:
URL: https://github.com/apache/texera/pull/7322#issuecomment-5187262760
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/7322?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 83.43%. Comparing base ([`86865f3`](https://app.codecov.io/gh/apache/texera/commit/86865f39926e82f5fba74574a79b05341f4e37b5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`8d07d68`](https://app.codecov.io/gh/apache/texera/commit/8d07d681b136b952a71ae17f82acff691943f47c?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 #7322 +/- ##
============================================
+ Coverage 83.37% 83.43% +0.05%
Complexity 4129 4129
============================================
Files 1166 1166
Lines 46424 46424
Branches 5174 5174
============================================
+ Hits 38707 38732 +25
+ Misses 6000 5981 -19
+ Partials 1717 1711 -6
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/7322/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/7322/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 [86865f3](https://app.codecov.io/gh/apache/texera/commit/86865f39926e82f5fba74574a79b05341f4e37b5?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/7322/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.65% <ø> (ø)` | | Carriedforward from [86865f3](https://app.codecov.io/gh/apache/texera/commit/86865f39926e82f5fba74574a79b05341f4e37b5?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/7322/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `80.69% <ø> (ø)` | | Carriedforward from [86865f3](https://app.codecov.io/gh/apache/texera/commit/86865f39926e82f5fba74574a79b05341f4e37b5?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/7322/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.60% <ø> (ø)` | | Carriedforward from [86865f3](https://app.codecov.io/gh/apache/texera/commit/86865f39926e82f5fba74574a79b05341f4e37b5?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/7322/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `65.97% <ø> (ø)` | | Carriedforward from [86865f3](https://app.codecov.io/gh/apache/texera/commit/86865f39926e82f5fba74574a79b05341f4e37b5?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/7322/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `69.05% <ø> (ø)` | | Carriedforward from [86865f3](https://app.codecov.io/gh/apache/texera/commit/86865f39926e82f5fba74574a79b05341f4e37b5?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/7322/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `84.15% <ø> (+0.12%)` | :arrow_up: | |
| [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/7322/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 [86865f3](https://app.codecov.io/gh/apache/texera/commit/86865f39926e82f5fba74574a79b05341f4e37b5?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/7322/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `97.36% <ø> (ø)` | | Carriedforward from [86865f3](https://app.codecov.io/gh/apache/texera/commit/86865f39926e82f5fba74574a79b05341f4e37b5?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/7322/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `26.31% <ø> (ø)` | | Carriedforward from [86865f3](https://app.codecov.io/gh/apache/texera/commit/86865f39926e82f5fba74574a79b05341f4e37b5?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/7322?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): cover the files-uploader restart branches [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan merged PR #7322:
URL: https://github.com/apache/texera/pull/7322
--
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 files-uploader restart branches [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7322:
URL: https://github.com/apache/texera/pull/7322#issuecomment-5187184015
<!-- 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:** `@mengw15`
You can notify them by mentioning `@mengw15` 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 files-uploader restart branches [texera]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #7322:
URL: https://github.com/apache/texera/pull/7322#discussion_r3717718892
##########
frontend/src/app/dashboard/component/user/files-uploader/files-uploader.component.spec.ts:
##########
@@ -148,6 +148,96 @@ describe("FilesUploaderComponent", () => {
expect((await emitted).map(item => item.name)).toEqual(["same.csv"]);
});
+ /**
+ * The Restart choices are the half of the conflict dialog the existing tests never take. They
+ * differ from Resume by exactly one observable: `item.restart`, which is what makes the uploader
+ * call the backend with type=forceRestart instead of continuing the existing multipart session.
+ * A Resume/Restart mix-up therefore silently resumes a session the user asked to discard.
+ */
Review Comment:
The doc comment says `item.restart` “stays unset”, but `FileUploadItem.restart` is a required boolean and is initialized to `false` in `fileDropped(...)`. Wording this as a `false -> true` transition makes the test intent and observable consistent with the production type/behavior.
This issue also appears in the following locations of the same file:
- line 171
- line 222
- line 235
--
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