rusackas commented on code in PR #43494:
URL: https://github.com/apache/superset/pull/43494#discussion_r3858273465


##########
superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx:
##########
@@ -2125,8 +2125,18 @@ describe('plugin-chart-table', () => {
           'rgba(0, 150, 0, 0.2)',
         );
 
-        // the row missing a formatter entry still renders its raw value
-        expect(screen.getAllByTitle('110').length).toBeGreaterThan(0);
+        // the row missing a formatter entry falls back to the row-level
+        // comparison arrow instead of losing it: before the fix, this row's
+        // arrow was silently cleared (and its color, computed the same way,
+        // would have flipped to the "decrease" color) whenever the
+        // column-specific lookup for this row was undefined.
+        const arrowCell = screen
+          .getAllByTitle('110')
+          .find(cell => cell.querySelector('span'));
+        expect(arrowCell).toHaveTextContent('↑110');
+        expect(getComputedStyle(arrowCell!).background).toContain(

Review Comment:
   Good catch — added an assertion that the fallback arrow's own `color` is 
`theme.colorSuccess`, not just the cell background.



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