sadpandajoe commented on code in PR #44665:
URL: https://github.com/apache/superset/pull/44665#discussion_r4173558030


##########
superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx:
##########
@@ -1357,6 +1441,306 @@ describe('plugin-chart-table', () => {
         cells = document.querySelectorAll('td');
       });
 
+      test('renders a bar for a cell-bar conditional formatting rule 
regardless of the global toggle', () => {
+        const props = (showCellBars: boolean) =>
+          cellBarProps({
+            values: [1234, 10000, 0],
+            showCellBars,
+            rule: cellBarRule({
+              operator: Comparator.Equal,
+              targetValue: 1234,
+            }),
+          });
+
+        // Toggle ON: bars render everywhere, including the matched cell.
+        const barsOn = renderCellBars(props(true)).bars;
+        expect(barsOn[0]).toBeTruthy();
+        expect(barsOn[1]).toBeTruthy();
+
+        // Toggle OFF: only the cell matching the rule draws a bar;
+        // non-matching cells stay bare.
+        const barsOff = renderCellBars(props(false)).bars;
+        expect(barsOff[0]).toBeTruthy();

Review Comment:
   These assertions still pass if the bar's background-color declaration is 
removed, leaving the bars transparent, so they don't protect the rule-color 
behavior being fixed here. Could this also assert the matching bar's configured 
color with the global toggle both on and off?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to