You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
add unit test coverage for ComputingUnitSelectionComponent resource-formatting getters #6745
ComputingUnitSelectionComponent sits at codecov ~66% (130 uncovered lines) — its spec covers the interaction flows but leaves the resource-formatting and status-display getters untested. Extend the spec to cover those pure getters. jsdom/Vitest; see frontend/TESTING.md.
Behavior to add
ComputingUnitSelectionComponent (frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts, codecov ~66% — EXTEND; spec covers flows, not the getters)
Scope: the pure resource-formatter and status-display getters — each delegates to a pure util from the current computing unit's values, so seed the component's selected unit (or stub the getCurrentComputingUnit* accessors) and assert the returned value:
CPU: getCpuLimit / getCpuValue / getCpuUnit / getCpuLimitUnit / getCpuPercentage / getCpuStatus — assert formatted numbers/units and that getCpuStatus maps a percentage to "success" | "exception" | "active" | "normal".
Trivial: trackByCuid / trackByIndex return the identity key.
Out of scope (separate issue): the WebSocket/HTTP/service-driven methods (runPveWebSocket, refreshUserPackages, refreshAvailableDbPves, createVirtualEnvironment, installUserPackages, terminateComputingUnit, selectComputingUnit) — they need service mocks.
Activity
test(frontend): cover the virtual-environment package management guar…