villebro commented on code in PR #24134: URL: https://github.com/apache/superset/pull/24134#discussion_r1198862624
########## superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts: ########## @@ -628,226 +630,231 @@ describe('formatSeriesName', () => { ); }); - describe('getLegendProps', () => { - it('should return the correct props for scroll type with top orientation without zoom', () => { - expect( - getLegendProps( - LegendType.Scroll, - LegendOrientation.Top, - true, - theme, - false, - ), - ).toEqual({ - show: true, - top: 0, - right: 0, - orient: 'horizontal', - type: 'scroll', - ...expectedThemeProps, - }); + it('should normalize non-UTC string based timestamp', () => { + const annualTimeFormatter = getTimeFormatter('%Y'); + expect( + formatSeriesName('1995-01-01 00:00:00.000000', { + timeFormatter: annualTimeFormatter, + coltype: GenericDataType.TEMPORAL, + }), + ).toEqual('1995'); + }); +}); + Review Comment: bycatch: the `getLegendProps` block was incorrectly nested inside the `formatSeriesName` block - check with "Hide whitespace" to see the relevant changes. -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org