mengw15 opened a new issue, #7331:
URL: https://github.com/apache/texera/issues/7331
### Task Summary
`UserVenvComponent`'s **template** is at ~36% (`user-venv.component.html`,
45 uncovered lines) while its class file is already ~93%. The spec drives the
class but most of the template never renders. Bring the template to full
coverage. Vitest/jsdom; see `frontend/TESTING.md`.
### Behavior to add
Extend `user-venv.component.spec.ts` so the template renders each branch,
then run the coverage report and cover the remaining red lines. The uncovered
constructs are `*ngIf` branches, `*ngFor` lists, `(click)` handlers and
`[(ngModel)]` bindings — for example the environment list rows
(`openExistingPve(i)`) and the modal body/footer actions (`closePveModal()`).
Approach:
- `fixture.detectChanges()` after each state change.
- Trigger the bindings through the DOM (`By.css` query +
`triggerEventHandler("click", …)`) rather than calling the methods directly.
- Seed the component with a few virtual environments so the `*ngFor`
expands, and toggle the modal-open / empty-list / loading flags so each `*ngIf`
arm renders.
Mock the backing service (`vi.fn()` / an existing `Stub…Service`) — no live
backend. Do not assert on layout/geometry under jsdom.
### Task Type
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [x] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
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]