diff --git a/web/client/epics/__tests__/widgetsbuilder-test.js b/web/client/epics/__tests__/widgetsbuilder-test.js index 573569aa10..e93f2f0aee 100644 --- a/web/client/epics/__tests__/widgetsbuilder-test.js +++ b/web/client/epics/__tests__/widgetsbuilder-test.js @@ -215,8 +215,8 @@ describe('widgetsbuilder epic', () => { }); it('handleWidgetsFilterPanel', (done) => { const startActions = [openFilterEditor()]; - testEpic(handleWidgetsFilterPanel, 4, startActions, actions => { - expect(actions.length).toBe(4); + testEpic(handleWidgetsFilterPanel, 3, startActions, actions => { + expect(actions.length).toBe(3); actions.map((action) => { switch (action.type) { case SET_CONTROL_PROPERTY: diff --git a/web/client/epics/widgetsbuilder.js b/web/client/epics/widgetsbuilder.js index b80270a4b8..694243f827 100644 --- a/web/client/epics/widgetsbuilder.js +++ b/web/client/epics/widgetsbuilder.js @@ -23,16 +23,9 @@ import { QUERY_FORM_SEARCH, loadFilter } from '../actions/queryform'; import { setControlProperty, TOGGLE_CONTROL } from '../actions/controls'; import { ADD_LAYER } from '../actions/layers'; import { LOCATION_CHANGE } from 'connected-react-router'; -import { featureTypeSelected } from '../actions/wfsquery'; import { getWidgetLayer, getEditingWidgetFilter, getWidgetFilterKey } from '../selectors/widgets'; import { wfsFilter } from '../selectors/query'; import { widgetBuilderAvailable } from '../selectors/controls'; -const getFTSelectedArgs = (state) => { - let layer = getWidgetLayer(state); - let url = layer.search && layer.search.url; - let typeName = layer.name; - return [url, typeName, layer.fields]; -}; export const openWidgetEditor = (action$, {getState = () => {}} = {}) => action$.ofType(NEW, EDIT, NEW_CHART) .filter(() => widgetBuilderAvailable(getState())) @@ -91,7 +84,6 @@ export const handleWidgetsFilterPanel = (action$, {getState = () => {}} = {}) => .switchMap(() => // open and setup query form Rx.Observable.of( - featureTypeSelected(...getFTSelectedArgs(getState())), loadFilter(getEditingWidgetFilter(getState())), setControlProperty("widgetBuilder", "enabled", false), setControlProperty('queryPanel', "enabled", true)