bito-code-review[bot] commented on code in PR #43113:
URL: https://github.com/apache/superset/pull/43113#discussion_r3964810869
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -2625,3 +2625,186 @@ describe('tooltip for metrics whose labels end in
forecast suffixes', () => {
expect(html).toContain('>ci<');
});
});
+test('tooltip formats each series with its own metric format instead of the
default formatter', () => {
+ // Two saved metrics with different formats: `pct_change` carries a
percentage
+ // D3 format, `count` carries a currency format. The series labels already
+ // honor each metric's format; the tooltip must do the same.
+ const chartProps = createTestChartProps({
+ formData: {
+ metrics: ['count', 'pct_change'],
+ richTooltip: true,
+ },
+ queriesData: [
+ createTestQueryData(
+ [{ count: 1000, pct_change: 0.1234, __timestamp: BASE_TIMESTAMP }],
+ { label_map: { count: ['count'], pct_change: ['pct_change'] } },
Review Comment:
<!-- Bito Reply -->
The decision to maintain the current test structure is appropriate. Given
the project's guidelines favoring flat, self-contained tests for readability
and independence, the trade-off of minor code repetition is acceptable. No
further action is required regarding the previous suggestion.
--
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]