bito-code-review[bot] commented on PR #43494:
URL: https://github.com/apache/superset/pull/43494#issuecomment-5416475674
<!-- Bito Reply -->
The concern is valid. The current test only verifies the presence of the
arrow and the background color of the cell, which does not guarantee that the
arrow's foreground color is correctly applied when falling back to the
row-level comparison. Adding an assertion for the nested span's color would
ensure the fallback arrow correctly inherits the expected theme color (e.g.,
`theme.colorSuccess` for an increase).
**superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx**
```
const arrowCell = screen
.getAllByTitle('110')
.find(cell => cell.querySelector('span'));
expect(arrowCell).toHaveTextContent('↑110');
expect(getComputedStyle(arrowCell!).background).toContain(
'rgba(0, 150, 0, 0.2)',
);
// Suggested addition:
expect(arrowCell?.querySelector('span')).toHaveStyle({
color: theme.colorSuccess,
});
```
--
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]