Copilot commented on code in PR #6675:
URL: https://github.com/apache/texera/pull/6675#discussion_r3626828305


##########
frontend/src/app/workspace/service/workflow-graph/model/workflow-graph.spec.ts:
##########
@@ -815,4 +829,70 @@ describe("WorkflowGraph", () => {
       sub.unsubscribe();
     });
   });
+
+  describe("isSink", () => {
+    const makeOperator = (operatorType: string): OperatorPredicate => ({
+      operatorID: "op",
+      operatorType,
+      operatorVersion: "v",
+      operatorProperties: {},
+      inputPorts: [],
+      outputPorts: [],
+      showAdvanced: true,
+      isDisabled: false,
+    });
+
+    it("should return true for the view-result sink operator type", () => {
+      expect(isSink(makeOperator(VIEW_RESULT_OP_TYPE))).toBe(true);
+    });
+
+    it("should return true whenever the operator type contains 'sink' as a 
substring", () => {
+      expect(isSink(makeOperator("CsvFileSink"))).toBe(true);
+      expect(isSink(makeOperator("SinkOperator"))).toBe(true);
+    });
+
+    it("should match case-insensitively", () => {
+      expect(isSink(makeOperator("SINK"))).toBe(true);
+      expect(isSink(makeOperator("SiNk"))).toBe(true);
+      expect(isSink(makeOperator("mySINKop"))).toBe(true);
+    });

Review Comment:
   These tests assert case-insensitive matching for "SINK"/"SiNk", but `isSink` 
currently uses `toLocaleLowerCase()` (workflow-graph.ts:81). Locale-sensitive 
lowercasing can break this expectation in some locales (e.g., Turkish "I" -> 
"ı"), making both the implementation and this test potentially flaky across 
environments. Consider changing `isSink` to use locale-independent 
`toLowerCase()` (or `toLocaleLowerCase('en-US')`) so behavior is deterministic.



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