mengw15 opened a new pull request, #6510: URL: https://github.com/apache/texera/pull/6510
### What changes were proposed in this PR? Adds a Vitest spec for `NzModalCommentBoxComponent` (`frontend/src/app/workspace/component/workflow-editor/comment-box-modal/nz-modal-comment-box.component.ts`), previously without a spec (~5% coverage). TestBed + `detectChanges()`, with `WorkflowActionService`, `UserService`, `NzModalRef`, `NotificationService`, and the Yjs `commentBox` all stubbed. 8 tests cover: - `should create` and render a comment from the box. - `onClickAddComment` — adds the comment through `workflowActionService` for the current user (content / author / id + box id) and clears the input; no-op (no service call) when there is no current user. - `deleteComment` — forwards to the service with the box id when a user is present; no-op without one. - `editComment` — forwards the edited content to the service and resets `editValue`. - `replyToComment` — appends a quoted mention to the input. - `onKeyDown` — submits on Ctrl/Cmd+Enter and ignores other keys. No production code was changed. ### Any related issues, documentation, discussions? Closes #6505 ### How was this PR tested? New unit tests, run locally in `frontend/` (all green; the failure path was verified by deliberately breaking an assertion to confirm the suite goes red): ``` ng test --watch=false --include src/app/workspace/component/workflow-editor/comment-box-modal/nz-modal-comment-box.component.spec.ts # Test Files 1 passed (1) | Tests 8 passed (8) prettier --write <spec> # formatted 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]
