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

   ### What changes were proposed in this PR?
   
   Extends `user-venv.component.spec.ts` to render the template branches the 
existing
   class-focused tests never exercised, taking the template from ~36% to 100%
   (`user-venv.component.html` 102/102). 9 new tests plus one class-guard test:
   
   - **list branches** — the empty-state message when there are no 
environments; a
     row per environment (with the `(unnamed)` fallback); clicking a row opens 
its
     draft; the delete icon fires `confirmDeletePve` and stops row-open 
propagation.
   - **modal** — the Create button opens an empty draft; opening the modal 
renders
     the form, the package header, one row per package, and the footer into the 
CDK
     overlay; the add-package / delete-toggle / Save / Close controls are driven
     through the DOM; the `nz-modal` cancel (X/mask) output closes the modal.
   - a `saveEnvironment` no-op-without-draft guard test brings the class to 
100% too.
   
   Interactions go through the DOM (`By.css` + `triggerEventHandler` / native
   `click`); the `nz-modal` body/footer render into the overlay, flushed with
   `ApplicationRef.tick()`. The backing `WorkflowPveService` is mocked; no 
layout
   assertions. No production code was changed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7331.
   
   ### How was this PR tested?
   
   `ng test --watch=false --include 
src/app/dashboard/component/user/user-venv/user-venv.component.spec.ts`
   — 33 passed, run 3× for determinism (the modal renders into the overlay). 
Coverage
   (`--coverage`) confirms `user-venv.component.html` at 102/102 and the 
component
   class at 89/89. The failure path was verified by breaking an assertion (red,
   non-zero exit); eslint and prettier are clean.
   
   ### 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