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


##########
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:
   Tightened to an exact single-column assertion (`getOutputSchemas(...) 
shouldBe Map(port -> Schema().add("html-content", STRING))`), mirroring the 
DumbbellPlot spec — it now fails if any extra column appears (c143aac).



##########
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:
   Now asserts both configured dots are emitted — the rendered `dotColumnNames` 
list must have two comma-separated entries, not just be non-empty (c143aac). 
The dot values are base64-encoded by the `pyb` interpolator, so the check is on 
entry count rather than the raw names.



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