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

   ### What changes were proposed in this PR?
   
   Adds a Vitest unit spec for `UserVenvComponent`, which previously had no 
test coverage. The 24 tests cover:
   - `ngOnInit`/`refreshPves` mapping DB records to drafts, including 
version-operator parsing (`==`/`>=`/`<=`/bare/empty), and the fetch-error path.
   - Modal lifecycle: `showPveModal`, `openExistingPve` (deep-copies packages; 
out-of-range no-op), `closePveModal`.
   - `addPackage` (no-op without a draft) and `togglePackageDelete`.
   - `saveEnvironment` validation (empty/whitespace name, non-alphanumeric 
name, duplicate name across a different `veid`, duplicate package) and the 
create (`savePve`) vs update (`updateUserPve`) branch, plus success (closes + 
refreshes) and error (keeps modal open) handling.
   - `confirmDeletePve` building the danger confirm whose `nzOnOk` drives 
`deletePve`, and `deletePve` guards/success/error.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6560.
   
   ### How was this PR tested?
   
   `npx ng test --watch=false --include='**/user-venv.component.spec.ts'` → 
24/24 passing. `yarn format:ci` passes.
   
   ### 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: [email protected]

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

Reply via email to