refactor(listviews): use correct filter endpoints for charts and datasets (#10442)

This commit is contained in:
ʈᵃᵢ
2020-07-29 11:00:19 -07:00
committed by GitHub
parent 7f70a241f9
commit 78cad9a4a8
16 changed files with 100 additions and 306 deletions

View File

@@ -301,6 +301,10 @@ describe('ListView', () => {
expect(wrapper.find(ListViewFilters)).toExist();
});
it('fetched async filter values on mount', () => {
expect(fetchSelectsMock).toHaveBeenCalled();
});
it('calls fetchData on filter', () => {
act(() => {
wrapper

View File

@@ -100,8 +100,8 @@ describe('DatasetList', () => {
it('fetches data', () => {
const callsD = fetchMock.calls(/dataset\/\?q/);
expect(callsD).toHaveLength(1);
expect(callsD[0][0]).toMatchInlineSnapshot(
expect(callsD).toHaveLength(2);
expect(callsD[1][0]).toMatchInlineSnapshot(
`"http://localhost/api/v1/dataset/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:25)"`,
);
});