mengw15 opened a new pull request, #8102:
URL: https://github.com/apache/texera/pull/8102
### What changes were proposed in this PR?
`computing-unit-selection.component.html` never rendered its unit list or
its metrics
popover with data, so the per-unit row controls and every metric row sat
unexecuted. This
PR adds 17 cases that open both for real and drive them from the markup. No
production
code changes.
- unit rows: selecting a row, the inline rename editor (focusout, Enter,
Escape, and the
click it swallows), and the pencil / plus / share / details / terminate
icons — each
asserting the row's own click handler did *not* also fire — plus the
create-unit row
- metrics popover: the CPU and RAM rows with their value, limit and
percentage, and each
optional row (GPU, JVM memory, shared memory) on **both** sides of its
guard
- the python-environment modal closing from its footer button and from
`nzOnCancel`
Template statement coverage goes from 71.35 % to 96.56 % (57 -> 7 uncovered
lines),
measured locally. The 7 that remain are inside the PVE modal body, outside
this issue.
A comment in the spec said the dropdown's overlay "does not attach under
jsdom", and this
turned out not to be the reason those lines were uncovered — the overlay
does attach. The
real obstacle is that ng-zorro gates it behind an `auditTime(150)` scheduled
outside the
Angular zone, which `fakeAsync`'s `tick()`/`flush()` cannot reach,
`whenStable()` waits on
forever (the component polls), and Vitest's fake timers cannot intercept
because zone.js
captured the native timer first. The helper therefore polls for the rendered
rows rather
than sleeping a fixed amount, so a slow runner costs extra iterations
instead of a
failure. The stale comment is replaced with this explanation.
### Any related issues, documentation, discussions?
Closes #8099
### How was this PR tested?
`ng test --watch=false --include
src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts`
-> 126 passed, run five times with identical results (five rather than three
because of
the polling helper). Five of the new assertions were verified to fail
(non-zero exit) when
deliberately broken. `prettier --check` and `eslint` are clean on the
touched file.
### 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]