mengw15 opened a new pull request, #6603: URL: https://github.com/apache/texera/pull/6603
### What changes were proposed in this PR? Extends three near-empty workspace/common service specs (Vitest; no production code changed). **`UndoRedoService`** (+7 tests) — a new describe drives the service through a `Y.UndoManager` double via `setUndoManager`: `undoAction` / `redoAction` delegate to the manager only when it can undo/redo (and toggle the joint-command guard back on), and are no-ops when the manager can't or while workflow modification is disabled; `canUndo` / `canRedo` require both the guard and the manager; `getUndoLength` / `getRedoLength` reflect the stacks; `clearUndoStack` / `clearRedoStack` clear the correct side; and with no manager `canUndo` / `canRedo` are false. **`WorkflowConsoleService`** (+3 tests) — a controlled `WorkflowWebsocketService` double drives the constructor's event subscriptions: a `ConsoleUpdateEvent` buffers messages exposed per operator via `getConsoleMessages` / `hasConsoleMessages` and pushes an update; `registerAutoClearConsoleMessages` clears the store on an `Initializing` `WorkflowStateEvent` (and leaves it alone for other states). **`NotificationService`** (+4 tests) — `NzMessageService` / `NzNotificationService` doubles verify `success` / `info` / `error` / `warning` / `loading` delegate to the message service (with the content/options and returned ref) and `blank` / `remove` delegate to the notification service. > Note: the issue lists `remove` as delegating to the message service; the code > actually routes `blank` and `remove` to `NzNotificationService`, which the test > asserts. ### Any related issues, documentation, discussions? Closes #6589 ### How was this PR tested? Extended unit tests, run locally in `frontend/` (all green; each spec's failure path was verified by breaking a new assertion to confirm it goes red): ``` ng test --watch=false --include src/app/workspace/service/undo-redo/undo-redo.service.spec.ts # 11 passed ng test --watch=false --include src/app/workspace/service/workflow-console/workflow-console.service.spec.ts # 5 passed ng test --watch=false --include src/app/common/service/notification/notification.service.spec.ts # 6 passed prettier --write <specs> # clean eslint <specs> # clean ``` All collaborators are stubbed, so the suite makes no network/websocket calls (see `frontend/TESTING.md`). ### 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]
