From 626949dff81e0f818f3b7331b846c08a4b3e6458 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 1 Mar 2022 01:04:34 +0300 Subject: [PATCH] #42 Updated test; Test changes to resolve map toolbar padding on map info toggle. --- js/extension/epics/__tests__/urbanisme-test.js | 5 ++--- js/extension/epics/urbanisme.js | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/js/extension/epics/__tests__/urbanisme-test.js b/js/extension/epics/__tests__/urbanisme-test.js index b15bfc4..340dac4 100644 --- a/js/extension/epics/__tests__/urbanisme-test.js +++ b/js/extension/epics/__tests__/urbanisme-test.js @@ -105,10 +105,10 @@ describe('Urbanisme EPICS', () => { }; testEpic( toggleLandPlanningEpic, - 5, + 4, toggleControl('urbanisme', null), actions => { - expect(actions.length).toBe(5); + expect(actions.length).toBe(4); actions.map(action=> { switch (action.type) { case UPDATE_ADDITIONAL_LAYER: @@ -116,7 +116,6 @@ describe('Urbanisme EPICS', () => { expect([URBANISME_RASTER_LAYER_ID, URBANISME_VECTOR_LAYER_ID].includes(action.options.id)).toBeTruthy(); break; case TOGGLE_MAPINFO_STATE: - case PURGE_MAPINFO_RESULTS: break; case TOGGLE_CONTROL: expect(action.control).toBe('measure'); diff --git a/js/extension/epics/urbanisme.js b/js/extension/epics/urbanisme.js index c4e17c2..61a5754 100644 --- a/js/extension/epics/urbanisme.js +++ b/js/extension/epics/urbanisme.js @@ -26,7 +26,7 @@ import { purgeMapInfoResults, SET_MAP_TRIGGER, setMapTrigger, TOGGLE_MAPINFO_STATE, toggleMapInfoState, - hideMapinfoMarker + hideMapinfoMarker, closeIdentify } from "@mapstore/actions/mapInfo"; import {localConfigSelector} from '@mapstore/selectors/localConfig'; @@ -292,7 +292,7 @@ export const deactivateOnIdentifyEnabledEpic = (action$, {getState}) => ? Rx.Observable.from([ toggleGFIPanel(false), toggleUrbanismeTool(null), - purgeMapInfoResults() + closeIdentify() ]) : Rx.Observable.empty(); });