diff --git a/web/client/epics/__tests__/geoProcessing-test.js b/web/client/epics/__tests__/geoProcessing-test.js index 1dd2b1d16cf..ebfe52a82df 100644 --- a/web/client/epics/__tests__/geoProcessing-test.js +++ b/web/client/epics/__tests__/geoProcessing-test.js @@ -83,6 +83,7 @@ import DESCRIBE_PROCESS_NO_BUFFER from 'raw-loader!../../test-resources/wfs/desc import DESCRIBE_POIS from '../../test-resources/wfs/describe-pois.json'; import GET_FEATURES from '../../test-resources/wms/GetFeature.json'; import COLLECT_GEOM from '../../test-resources/wps/collectGeom.json'; +import MULTIPOLYGON_FC from '../../test-resources/wps/MultiPolygonFC.json'; import { @@ -604,11 +605,17 @@ describe('geoProcessing epics', () => { it('runIntersectProcessGPTEpic with double geom collect', (done) => { const NUM_ACTIONS = 7; mockAxios.onGet("mockUrl?service=WFS&version=1.1.0&request=GetFeature").reply(200, GET_FEATURES); - mockAxios.onPost("mockUrl?service=WPS&version=1.0.0&REQUEST=Execute").reply(200, COLLECT_GEOM, { - "content-type": "application/json" - }); + mockAxios + .onPost("mockUrl?service=WPS&version=1.0.0&REQUEST=Execute") + .replyOnce(200, COLLECT_GEOM, { + "content-type": "application/json" + }) + .onPost("mockUrl?service=WPS&version=1.0.0&REQUEST=Execute") + .replyOnce(200, MULTIPOLYGON_FC, { + "content-type": "application/json" + }); mockAxios.onGet("mockUrl2?service=WFS&version=1.1.0&request=GetFeature").reply(200, GET_FEATURES); - mockAxios.onPost("mockUrl2?service=WPS&version=1.0.0&REQUEST=Execute").reply(200, COLLECT_GEOM, { + mockAxios.onPost("mockUrl2?service=WPS&version=1.0.0&REQUEST=Execute").replyOnce(200, COLLECT_GEOM, { "content-type": "application/json" }); diff --git a/web/client/test-resources/wps/MultiPolygonFC.json b/web/client/test-resources/wps/MultiPolygonFC.json new file mode 100644 index 00000000000..b0fe6fb3369 --- /dev/null +++ b/web/client/test-resources/wps/MultiPolygonFC.json @@ -0,0 +1,57 @@ +{ + "type": "FeatureCollections", + "features": [ + { + "type": "Feature", + "properties": { + "goat": "Valentino Rossi" + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + 1.60533116, + 46.01664018 + ], + [ + 9.80373297, + 46.01664018 + ], + [ + 9.80373297, + 44.55317604 + ], + [ + 10.48897253, + 44.55317604 + ], + [ + 10.48897253, + 44.27347776 + ], + [ + 9.80373297, + 44.27347776 + ], + [ + 9.80373297, + 43.62155322 + ], + [ + 1.60533116, + 43.62155322 + ], + [ + 1.60533116, + 46.01664018 + ] + ] + ] + ] + } + } + + ] +}