Task Summary
Three workspace services whose specs are near-empty (each asserts little beyond creation) while codecov sits well below their real surface. Extend each spec. Vitest; see frontend/TESTING.md (reuse Stub…Service doubles / useValue + vi.fn()).
Behavior to add
UndoRedoService (frontend/src/app/workspace/service/undo-redo/undo-redo.service.ts, codecov ~67%)
- Drive via
setUndoManager(...) with a Y.UndoManager double (or a real one over a Y.Doc): undoAction / redoAction call undo / redo only when canUndo / canRedo; canUndo / canRedo / getUndoLength / getRedoLength reflect the manager; clearUndoStack / clearRedoStack clear it; enableWorkFlowModification / disableWorkFlowModification toggle the guard so actions become no-ops when disabled.
WorkflowConsoleService (frontend/src/app/workspace/service/workflow-console/workflow-console.service.ts, codecov ~68%)
getConsoleMessages / hasConsoleMessages after messages arrive; clearConsoleMessages empties the store and pushes an update on getConsoleMessageUpdateStream; registerAutoClearConsoleMessages clears on the configured trigger.
NotificationService (frontend/src/app/common/service/notification/notification.service.ts, codecov ~47%)
- Inject
NzMessageService + NzNotificationService doubles (vi.fn()). Assert success / error / info / warning / blank delegate to the right notification type with the given title/content/options, and loading / remove delegate to the message service.
Task Type
Task Summary
Three workspace services whose specs are near-empty (each asserts little beyond creation) while codecov sits well below their real surface. Extend each spec. Vitest; see
frontend/TESTING.md(reuseStub…Servicedoubles /useValue+vi.fn()).Behavior to add
UndoRedoService (
frontend/src/app/workspace/service/undo-redo/undo-redo.service.ts, codecov ~67%)setUndoManager(...)with aY.UndoManagerdouble (or a real one over aY.Doc):undoAction/redoActioncallundo/redoonly whencanUndo/canRedo;canUndo/canRedo/getUndoLength/getRedoLengthreflect the manager;clearUndoStack/clearRedoStackclear it;enableWorkFlowModification/disableWorkFlowModificationtoggle the guard so actions become no-ops when disabled.WorkflowConsoleService (
frontend/src/app/workspace/service/workflow-console/workflow-console.service.ts, codecov ~68%)getConsoleMessages/hasConsoleMessagesafter messages arrive;clearConsoleMessagesempties the store and pushes an update ongetConsoleMessageUpdateStream;registerAutoClearConsoleMessagesclears on the configured trigger.NotificationService (
frontend/src/app/common/service/notification/notification.service.ts, codecov ~47%)NzMessageService+NzNotificationServicedoubles (vi.fn()). Assertsuccess/error/info/warning/blankdelegate to the right notification type with the given title/content/options, andloading/removedelegate to the message service.Task Type