Xiao-zhen-Liu commented on code in PR #6075:
URL: https://github.com/apache/texera/pull/6075#discussion_r3561300388


##########
frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.spec.ts:
##########
@@ -967,6 +966,20 @@ describe("WorkflowEditorComponent", () => {
 
         expect(getStroke(mockScanPredicate.operatorID)).toBe("red");
       });
+
+      it("supplies a computed Validation from the operator-add path", () => {
+        // The operator-add subscriber now obtains the Validation itself (via
+        // validateOperator) and forwards it to applyOperatorBorder, so the
+        // helper's parameter can stay required with no fallback recompute.
+        vi.spyOn(workflowStatusService, 
"getCurrentStatus").mockReturnValue({});
+        vi.spyOn(validationWorkflowService, 
"validateOperator").mockReturnValue({ isValid: true });
+        const applyBorderSpy = vi.spyOn(component as any, 
"applyOperatorBorder");
+
+        workflowActionService.addOperator(mockScanPredicate, mockPoint);
+        fixture.detectChanges();
+
+        
expect(applyBorderSpy).toHaveBeenCalledWith(mockScanPredicate.operatorID, { 
isValid: true });

Review Comment:
   `applyOperatorBorder` fires from both subscribers on add, so 
`toHaveBeenCalledWith` passes if either call matches — this doesn't isolate the 
operator-add caller specifically. Fine as-is, just slightly looser than the 
name implies.



-- 
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]

Reply via email to