diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts index 172ce24204218..df48354a81586 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts @@ -174,60 +174,62 @@ describe('EchartsTimeseries transformProps', () => { titleColumn: '', value: 3, }; - const chartProps = new ChartProps({ - ...chartPropsConfig, - formData: { - ...formData, - annotationLayers: [event, interval, timeseries], + const annotationData = { + 'My Event': { + columns: [ + 'start_dttm', + 'end_dttm', + 'short_descr', + 'long_descr', + 'json_metadata', + ], + records: [ + { + start_dttm: 0, + end_dttm: 1000, + short_descr: '', + long_descr: '', + json_metadata: null, + }, + ], }, - annotationData: { - 'My Event': { - columns: [ - 'start_dttm', - 'end_dttm', - 'short_descr', - 'long_descr', - 'json_metadata', - ], - records: [ + 'My Interval': { + columns: ['start', 'end', 'title'], + records: [ + { + start: 2000, + end: 3000, + title: 'My Title', + }, + ], + }, + 'My Timeseries': [ + { + key: 'My Line', + values: [ { - start_dttm: 0, - end_dttm: 1000, - short_descr: '', - long_descr: '', - json_metadata: null, + x: 10000, + y: 11000, }, - ], - }, - 'My Interval': { - columns: ['start', 'end', 'title'], - records: [ { - start: 2000, - end: 3000, - title: 'My Title', + x: 20000, + y: 21000, }, ], }, - 'My Timeseries': [ - { - key: 'My Line', - values: [ - { - x: 10000, - y: 11000, - }, - { - x: 20000, - y: 21000, - }, - ], - }, - ], + ], + }; + const chartProps = new ChartProps({ + ...chartPropsConfig, + formData: { + ...formData, + annotationLayers: [event, interval, timeseries], }, + annotationData, queriesData: [ { ...queriesData[0], + annotation_data: annotationData, }, ], });