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


##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/visualization/dumbbellPlot/DumbbellPlotOpDescSpec.scala:
##########
@@ -67,6 +67,31 @@ class DumbbellPlotOpDescSpec extends AnyFlatSpec with 
Matchers {
     code should include("go.Scatter(")
   }
 
+  "DumbbellPlotOpDesc.createPlotlyDumbbellLineFigure" should
+    "select the showlegend flag from showLegends" in {
+    val on = new DumbbellPlotOpDesc
+    on.showLegends = true
+    on.createPlotlyDumbbellLineFigure().plain should include("showlegend=True")
+
+    val off = new DumbbellPlotOpDesc // showLegends defaults to false
+    off.createPlotlyDumbbellLineFigure().plain should 
include("showlegend=False")
+  }
+
+  "DumbbellPlotOpDesc.addPlotlyDots" should
+    "list the configured dot columns and default to an empty list" in {
+    val d = new DumbbellPlotOpDesc
+    val dot1 = new DumbbellDotConfig
+    dot1.dotValue = "q1"
+    val dot2 = new DumbbellDotConfig
+    dot2.dotValue = "q2"
+    d.dots = java.util.Arrays.asList(dot1, dot2)
+    val withDots = d.addPlotlyDots().plain
+    withDots should include("dotColumnNames = [")
+    withDots should not include "dotColumnNames = []"
+

Review Comment:
   This test aims to verify that configured dot columns are listed, but it only 
asserts that the generated list is non-empty. It would still pass if only one 
configured dot is emitted (or if unrelated content makes the list non-empty). 
Asserting that both configured dot names appear makes the branch coverage more 
precise.



##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/visualization/filledAreaPlot/FilledAreaPlotOpDescSpec.scala:
##########
@@ -104,4 +107,48 @@ class FilledAreaPlotOpDescSpec extends AnyFlatSpec with 
BeforeAndAfter with Matc
     plain should include("area_y")
     plain should include("px.area")
   }
+
+  "FilledAreaPlotOpDesc.getOutputSchemas" should
+    "return a single html-content STRING column" in {
+    val out = opDesc.getOutputSchemas(Map.empty)
+    out should have size 1
+    val schema = out.values.head
+    schema.getAttributeNames should contain("html-content")

Review Comment:
   This test says it expects a *single* output column, but it only checks that 
`html-content` is present. If `getOutputSchemas` accidentally adds extra 
columns, this test would still pass. Consider asserting the full attribute-name 
list exactly matches the single expected column.



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