mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
[charts] adds new filters ui (#9530)
* [charts] adds new filters ui * move null check to be more visible * better filter lists and async filter functionality
This commit is contained in:
@@ -32,6 +32,8 @@ const store = mockStore({});
|
||||
const chartsInfoEndpoint = 'glob:*/api/v1/chart/_info*';
|
||||
const chartssOwnersEndpoint = 'glob:*/api/v1/chart/related/owners*';
|
||||
const chartsEndpoint = 'glob:*/api/v1/chart/?*';
|
||||
const chartsVizTypesEndpoint = 'glob:*/api/v1/chart/viz_types';
|
||||
const chartsDtasourcesEndpoint = 'glob:*/api/v1/chart/datasources';
|
||||
|
||||
const mockCharts = [...new Array(3)].map((_, i) => ({
|
||||
changed_on: new Date().toISOString(),
|
||||
@@ -40,6 +42,7 @@ const mockCharts = [...new Array(3)].map((_, i) => ({
|
||||
slice_name: `cool chart ${i}`,
|
||||
url: 'url',
|
||||
viz_type: 'bar',
|
||||
datasource_name: `ds${i}`,
|
||||
}));
|
||||
|
||||
fetchMock.get(chartsInfoEndpoint, {
|
||||
@@ -60,6 +63,16 @@ fetchMock.get(chartsEndpoint, {
|
||||
chart_count: 3,
|
||||
});
|
||||
|
||||
fetchMock.get(chartsVizTypesEndpoint, {
|
||||
result: [],
|
||||
count: 0,
|
||||
});
|
||||
|
||||
fetchMock.get(chartsDtasourcesEndpoint, {
|
||||
result: [],
|
||||
count: 0,
|
||||
});
|
||||
|
||||
describe('ChartList', () => {
|
||||
const mockedProps = {};
|
||||
const wrapper = mount(<ChartList {...mockedProps} />, {
|
||||
|
||||
Reference in New Issue
Block a user