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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to