sadpandajoe commented on code in PR #43494:
URL: https://github.com/apache/superset/pull/43494#discussion_r3857163745
##########
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:
This only proves the fallback arrow is rendered; the `<td>` background was
already preserved before this change, so a regression that applies the decrease
color to the fallback arrow still passes. Could this assert the nested arrow
span’s foreground color is `theme.colorSuccess` for this increase case?
--
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]