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#9970 url arr bug (geosolutions-it#10004)
* Added getDefaultUrl helper in URLUtils.js Fixed callers into urlUtils library, make sure a string is passed for the url argument. FIxed impl which assumes that layer.url can only be string. * Fix typo, actually fix the reported problem * Added tests where getDefaultUrl change is introduced. * Fixed multiple url test in styleeditor-test.js * Added missing tests in WFS-test.js Fixed license year in new files. Adjusted styleeditor-test.js to more appropriately test the bugfix. Tweaked wms dc.references in CSW.js to always default to a single URL string.
- Loading branch information
Showing
20 changed files
with
360 additions
and
25 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
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,80 @@ | ||
/* | ||
* Copyright 2024, 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 { describeCoverage } from '../WCS'; | ||
import axios from '../../libs/ajax'; | ||
import expect from 'expect'; | ||
|
||
import MockAdapter from "axios-mock-adapter"; | ||
let mockAxios; | ||
|
||
let _xmlSample = `<wcs> | ||
<enabled>true</enabled> | ||
<name>WCS</name> | ||
<title>Web Coverage Service</title> | ||
<maintainer>http://geoserver.org/comm</maintainer> | ||
<abstrct>This server implements the WCS specification 1.0 and 1.1.1, it's reference implementation of WCS 1.1.1. All layers published by this service are available on WMS also. | ||
</abstrct> | ||
<accessConstraints>NONE</accessConstraints> | ||
<fees>NONE</fees> | ||
<versions> | ||
<org.geotools.util.Version> | ||
<version>1.0.0</version> | ||
</org.geotools.util.Version> | ||
<org.geotools.util.Version> | ||
<version>1.1.1</version> | ||
</org.geotools.util.Version> | ||
<org.geotools.util.Version> | ||
<version>2.0.1</version> | ||
</org.geotools.util.Version> | ||
</versions> | ||
<keywords> | ||
<string>WCS</string> | ||
<string>WMS</string> | ||
<string>GEOSERVER</string> | ||
</keywords> | ||
<metadataLink> | ||
<type>undef</type> | ||
<about>http://geoserver.sourceforge.net/html/index.php</about> | ||
<metadataType>other</metadataType> | ||
</metadataLink> | ||
<citeCompliant>false</citeCompliant> | ||
<onlineResource>http://geoserver.org</onlineResource> | ||
<schemaBaseURL>http://schemas.opengis.net</schemaBaseURL> | ||
<verbose>false</verbose> | ||
<gmlPrefixing>false</gmlPrefixing> | ||
<latLon>false</latLon> | ||
<maxInputMemory>0</maxInputMemory> | ||
<maxOutputMemory>0</maxOutputMemory> | ||
</wcs>`; | ||
|
||
describe('Test WCS API', () => { | ||
beforeEach(done => { | ||
mockAxios = new MockAdapter(axios); | ||
setTimeout(done); | ||
}); | ||
|
||
afterEach(done => { | ||
mockAxios.restore(); | ||
setTimeout(done); | ||
}); | ||
it('describeCoverage', (done) => { | ||
mockAxios.onGet().reply(200, _xmlSample); | ||
describeCoverage([ | ||
'http://gs-stable.geosolutionsgroup.com:443/geoserver/services/wcs/settings', | ||
'http://gs-stable.geosolutionsgroup.com:443/geoserver2/services/wcs/settings', | ||
'http://gs-stable.geosolutionsgroup.com:443/geoserver3/services/wcs/settings' | ||
], 'testName').then((result) => { | ||
try { | ||
expect(result).toExist(); | ||
done(); | ||
} catch (ex) { | ||
done(ex); | ||
} | ||
}); | ||
}); | ||
}); |
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
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
Oops, something went wrong.