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

   ### What changes were proposed in this PR?
   
   Extends the existing `ComputingUnitSelectionComponent` spec to cover its
   previously-untested resource-formatting and status-display getters
   
(`frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts`).
   The selected computing unit is seeded directly so each getter's own logic is
   exercised.
   
   13 tests cover: fallbacks when no unit is selected; `getButtonText` /
   `computeStatus` / `isComputingUnitRunning` across statuses; the raw gpu / 
jvm /
   shared-memory passthroughs; `getCpuLimit` / `getMemoryLimit`; the 
display-unit
   derivation (empty cpu unit → "Cores", empty memory unit → "B"); the 
N/A-metrics
   0% / `success` case and a real cpu percentage; `getBadgeColor`;
   `getUnitStatusTooltip`; `cannotSelectUnit` / `isSelectedUnit`; 
`isCreateDisabled`;
   and the `trackByCuid` / `trackByIndex` identities.
   
   No production code was changed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6745
   
   ### How was this PR tested?
   
   New unit tests, run locally in `frontend/` (all green; the failure path was
   verified by breaking an assertion to confirm the suite goes red):
   
   ```
   ng test --watch=false --include 
src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts
   # Test Files 1 passed (1) | Tests 113 passed (113)
   prettier --write <spec>   # clean
   eslint  <spec>            # 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