Skip to content

Commit

Permalink
Update tests with realistic chart data
Browse files Browse the repository at this point in the history
  • Loading branch information
robdiciuccio committed Mar 22, 2021
1 parent 4dc9d02 commit d3afcc6
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion superset-frontend/spec/javascripts/middleware/asyncEvent_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,35 @@ describe('asyncEvent middleware', () => {
errors: [{ message: "Error: relation 'foo' does not exist" }],
};
const chartData = {
some: 'data',
result: [
{
cache_key: '199f01f81f99c98693694821e4458111',
cached_dttm: null,
cache_timeout: 86400,
annotation_data: {},
error: null,
is_cached: false,
query:
'SELECT product_line AS product_line,\n sum(sales) AS "(Sales)"\nFROM cleaned_sales_data\nGROUP BY product_line\nLIMIT 50000',
status: 'success',
stacktrace: null,
rowcount: 7,
colnames: ['product_line', '(Sales)'],
coltypes: [1, 0],
data: [
{
product_line: 'Classic Cars',
'(Sales)': 3919615.66,
},
],
applied_filters: [
{
column: '__time_range',
},
],
rejected_filters: [],
},
],
};

const EVENTS_ENDPOINT = 'glob:*/api/v1/async_event/*';
Expand Down

0 comments on commit d3afcc6

Please sign in to comment.