Task Summary
frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.ts (codecov ~9%, no spec) — add a behavior-focused Vitest spec (TestBed + detectChanges()). See frontend/TESTING.md and the user-dataset-list-item spec (#5230) for the pattern; mock ComputingUnitService, NotificationService, ComputingUnitStatusService, ComputingUnitActionsService.
Behavior to cover
should create — instantiates; fixture.detectChanges() renders the template
entry @input / unit getter — expose the bound value
confirmUpdateUnitName(cuid, newName):
- invalid name (via
validateName) -> notificationService.error(validationError) + cancels editing; no rename call
- valid -> calls
computingUnitService.renameComputingUnit(cuid, trimmedName); on success -> notificationService.success("Successfully renamed computing unit"), updates entry.computingUnit.name when the cuid matches, calls refreshComputingUnitList(); on error -> notificationService.error("Failed to rename computing unit: ...")
onClickOpenShareAccess(cuid) -> calls computingUnitActionsService.openShareAccessModal(cuid, false)
@Output() deleted — emits on the delete flow
Task Type
Task Summary
frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.ts(codecov ~9%, no spec) — add a behavior-focused Vitest spec (TestBed +detectChanges()). Seefrontend/TESTING.mdand theuser-dataset-list-itemspec (#5230) for the pattern; mockComputingUnitService,NotificationService,ComputingUnitStatusService,ComputingUnitActionsService.Behavior to cover
should create— instantiates;fixture.detectChanges()renders the templateentry@input /unitgetter — expose the bound valueconfirmUpdateUnitName(cuid, newName):validateName) ->notificationService.error(validationError)+ cancels editing; no rename callcomputingUnitService.renameComputingUnit(cuid, trimmedName); on success ->notificationService.success("Successfully renamed computing unit"), updatesentry.computingUnit.namewhen the cuid matches, callsrefreshComputingUnitList(); on error ->notificationService.error("Failed to rename computing unit: ...")onClickOpenShareAccess(cuid)-> callscomputingUnitActionsService.openShareAccessModal(cuid, false)@Output() deleted— emits on the delete flowTask Type