forked from geosolutions-it/MapStore2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
geosolutions-it#8723 Fix for WMTS background issues due to `attributi…
…on` parameter; geosolutions-it#8724 WMTS request identify flow fixes (geosolutions-it#8725)
- Loading branch information
Showing
4 changed files
with
84 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright 2022, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import expect from 'expect'; | ||
|
||
import axios from '../../../libs/ajax'; | ||
import MockAdapter from "axios-mock-adapter"; | ||
import {INFO_FORMATS} from "../../FeatureInfoUtils"; | ||
import {getFeatureInfo} from "../../../api/identify"; | ||
|
||
describe('mapinfo wmts utils', () => { | ||
let mockAxios; | ||
beforeEach((done) => { | ||
mockAxios = new MockAdapter(axios); | ||
setTimeout(done); | ||
}); | ||
afterEach((done) => { | ||
if (mockAxios) { | ||
mockAxios.restore(); | ||
} | ||
mockAxios = null; | ||
setTimeout(done); | ||
}); | ||
|
||
it('should return the response object from getIdentifyFlow in case of 400 error, TileOutOfRange', (done) => { | ||
const SAMPLE_LAYER = { | ||
type: "wmts", | ||
name: "test_layer" | ||
}; | ||
mockAxios.onGet().reply(() => { | ||
return [400, '<?xml version="1.0" encoding="UTF-8"?><ExceptionReport version="1.1.0" xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd"> <Exception exceptionCode="TileOutOfRange" locator="TILEROW"> <ExceptionText>Row 84 is out of range, min: 85 max:87</ExceptionText> </Exception></ExceptionReport>']; | ||
}); | ||
getFeatureInfo( | ||
"TEST_URL", { | ||
info_format: INFO_FORMATS.PROPERTIES | ||
}, SAMPLE_LAYER | ||
).subscribe( | ||
n => { | ||
expect(n.data.features).toEqual([]); | ||
expect(n.features).toEqual([]); | ||
done(); | ||
}, | ||
error => { | ||
return done(error); | ||
} | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters