Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 committed Oct 19, 2023
1 parent 71e13a6 commit 6a2bbdf
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 4 deletions.
15 changes: 11 additions & 4 deletions web/client/epics/__tests__/geoProcessing-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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"
});

Expand Down
57 changes: 57 additions & 0 deletions web/client/test-resources/wps/MultiPolygonFC.json
Original file line number Diff line number Diff line change
@@ -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
]
]
]
]
}
}

]
}

0 comments on commit 6a2bbdf

Please sign in to comment.