alexandrusoare commented on code in PR #36989:
URL: https://github.com/apache/superset/pull/36989#discussion_r2707600786
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -723,3 +727,169 @@ describe('legend sorting', () => {
]);
});
});
+
+const baseFormDataHorizontalBar: SqlaFormData = {
+ colorScheme: 'bnbColors',
+ datasource: '3__table',
+ granularity_sqla: '__timestamp',
+ metric: 'sum__num',
+ groupby: [],
+ viz_type: 'echarts_timeseries',
+ seriesType: EchartsTimeseriesSeriesType.Bar,
+ orientation: OrientationType.Horizontal,
+ truncateYAxis: true,
+ yAxisBounds: [null, null],
+};
+
+test('should set yAxis max to actual data max for horizontal bar charts', ()
=> {
+ const queriesData = [
+ {
+ data: [
+ { 'Series A': 15000, __timestamp: 599616000000 },
+ { 'Series A': 20000, __timestamp: 599916000000 },
+ { 'Series A': 18000, __timestamp: 600216000000 },
+ ],
Review Comment:
I have noticed this for some PRs that involve timestamps, and I think all of
them tend to hardcode the dates for every individual test. Is there a way to
standardize this and mock it so that we wouldn t have to hardcode and define
the timestamps in every individual test 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]