PG1204 commented on code in PR #5702:
URL: https://github.com/apache/texera/pull/5702#discussion_r3455557512
##########
frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.spec.ts:
##########
@@ -910,6 +910,22 @@ describe("WorkflowEditorComponent", () => {
expect(getStroke(mockScanPredicate.operatorID)).toBe("red");
});
+
+ it("uses the Validation passed in instead of recomputing it", () => {
+ // Let the validation chain settle from the operator-add so subsequent
+ // calls to validateOperator are isolated to the helper itself.
+ workflowActionService.addOperator(mockScanPredicate, mockPoint);
+ fixture.detectChanges();
+
+ const validateSpy = vi.spyOn(validationWorkflowService,
"validateOperator").mockClear();
+
+ // Call the helper directly with a Validation argument, mirroring what
+ // the validation-stream subscriber does at runtime
+ // (handleOperatorValidation passes value.validation through).
+ (component as any).applyOperatorBorder(mockScanPredicate.operatorID, {
isValid: true });
Review Comment:
addressed in
[cda9952](https://github.com/apache/texera/pull/5702/commits/cda9952a2783cbd59d951474f1d9e58f4a3097ef)
--
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]