Skip to content

Commit 6c450ce

Browse files
committed
【fix】test
1 parent 828f347 commit 6c450ce

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

test/leaflet/components/clientcomputation/ClientComputationViewSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('leaflet_clientcomputation_ClientComputationView', () => {
4141
spyOn(FetchRequest, 'post').and.callFake((url, queryString) => {
4242
// let param = JSON.parse(queryString.replace(/\'/g, "\""));
4343
console.log(url);
44-
if (url.indexOf("/queryResults.json") > -1) {
44+
if (url.indexOf("/queryResults") > -1) {
4545
var escapedJson = clientComputationViewJson;
4646
return Promise.resolve(new Response(JSON.stringify(escapedJson)));
4747

test/leaflet/components/dataservicequery/DataServiceQueryViewSpec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('leaflet_DataServiceQuery_DataServiceQueryView', () => {
4747
expect(dataServiceQuery).not.toBeNull();
4848
spyOn(FetchRequest, 'post').and.callFake((url, queryString) => {
4949
let param = JSON.parse(queryString.replace(/\'/g, "\""));
50-
if (url.indexOf(dataServiceURL + "/featureResults.json") > -1 && param.getFeatureMode === "ID") {
50+
if (url.indexOf(dataServiceURL + "/featureResults") > -1 && param.getFeatureMode === "ID") {
5151
var escapedJson = `{"features":[{"fieldNames":["SMID","SMX","SMY","SMLIBTILEID","SMUSERID","SMGEOMETRYSIZE","USERID","POP","CAPITAL_LO","CAPITAL_CH","COUNTRY_CH","CAPITAL_EN","COUNTRY_EN","COUNTRY","CAP_POP","CAPITAL"],"geometry":{"center":{"x":-47.8977476573595,"y":-15.792110943058866},"parts":[1],"style":null,"prjCoordSys":null,"id":1,"type":"POINT","partTopo":null,"points":[{"x":-47.8977476573595,"y":-15.792110943058866}]},"fieldValues":["1","-47.8977476573595","-15.792110943058866","1","0","16","0","2207718.0","Brasília","巴西利亚","巴西","Brasilia","Brazil","巴西","2207718.0","巴西利亚"],"ID":1},{"fieldNames":["SMID","SMX","SMY","SMLIBTILEID","SMUSERID","SMGEOMETRYSIZE","USERID","POP","CAPITAL_LO","CAPITAL_CH","COUNTRY_CH","CAPITAL_EN","COUNTRY_EN","COUNTRY","CAP_POP","CAPITAL"],"geometry":{"center":{"x":-171.739493590236,"y":-13.837022952831255},"parts":[1],"style":null,"prjCoordSys":null,"id":2,"type":"POINT","partTopo":null,"points":[{"x":-171.739493590236,"y":-13.837022952831255}]},"fieldValues":["2","-171.739493590236","-13.837022952831255","1","0","16","0","40407.0","Apia","阿皮亚","萨摩亚","Apia","Samoa","萨摩亚","40407.0","阿皮亚"],"ID":2},{"fieldNames":["SMID","SMX","SMY","SMLIBTILEID","SMUSERID","SMGEOMETRYSIZE","USERID","POP","CAPITAL_LO","CAPITAL_CH","COUNTRY_CH","CAPITAL_EN","COUNTRY_EN","COUNTRY","CAP_POP","CAPITAL"],"geometry":{"center":{"x":-175.245650649682,"y":-21.13090205664112},"parts":[1],"style":null,"prjCoordSys":null,"id":3,"type":"POINT","partTopo":null,"points":[{"x":-175.245650649682,"y":-21.13090205664112}]},"fieldValues":["3","-175.245650649682","-21.13090205664112","1","0","16","0","22400.0","Nukuʻalofa","努库阿洛法","汤加","Nuku' alofa","Tonga","汤加","22400.0","努库阿洛法"],"ID":3}],"featureUriList":[],"totalCount":3,"featureCount":3}`;
5252
return Promise.resolve(new Response(escapedJson));
5353
}
@@ -81,7 +81,7 @@ describe('leaflet_DataServiceQuery_DataServiceQueryView', () => {
8181
expect(dataServiceQuery).not.toBeNull();
8282
spyOn(FetchRequest, 'post').and.callFake((url, queryString) => {
8383
let param = JSON.parse(queryString.replace(/\'/g, "\""));
84-
if (url.indexOf(dataServiceURL + "/featureResults.json") > -1 && param.getFeatureMode === "SQL") {
84+
if (url.indexOf(dataServiceURL + "/featureResults") > -1 && param.getFeatureMode === "SQL") {
8585
var escapedJson = `{"features":[{"fieldNames":["SMID","SMX","SMY","SMLIBTILEID","SMUSERID","SMGEOMETRYSIZE","USERID","POP","CAPITAL_LO","CAPITAL_CH","COUNTRY_CH","CAPITAL_EN","COUNTRY_EN","COUNTRY","CAP_POP","CAPITAL"],"geometry":{"center":{"x":-47.8977476573595,"y":-15.792110943058866},"parts":[1],"style":null,"prjCoordSys":null,"id":1,"type":"POINT","partTopo":null,"points":[{"x":-47.8977476573595,"y":-15.792110943058866}]},"fieldValues":["1","-47.8977476573595","-15.792110943058866","1","0","16","0","2207718.0","Brasília","巴西利亚","巴西","Brasilia","Brazil","巴西","2207718.0","巴西利亚"],"ID":1}],"featureUriList":[],"totalCount":1,"featureCount":1}`;
8686
return Promise.resolve(new Response(escapedJson));
8787
}
@@ -124,7 +124,7 @@ describe('leaflet_DataServiceQuery_DataServiceQueryView', () => {
124124
expect(dataServiceQuery).not.toBeNull();
125125
spyOn(FetchRequest, 'post').and.callFake((url, queryString) => {
126126
let param = JSON.parse(queryString.replace(/\'/g, "\""));
127-
if (url.indexOf(dataServiceURL + "/featureResults.json") > -1 && param.getFeatureMode.indexOf("BOUNDS") > -1) {
127+
if (url.indexOf(dataServiceURL + "/featureResults") > -1 && param.getFeatureMode.indexOf("BOUNDS") > -1) {
128128
var escapedJson = `{"features":[],"featureUriList":[],"totalCount":0,"featureCount":0}`;
129129
return Promise.resolve(new Response(escapedJson));
130130
}
@@ -165,7 +165,7 @@ describe('leaflet_DataServiceQuery_DataServiceQueryView', () => {
165165
expect(dataServiceQuery).not.toBeNull();
166166
spyOn(FetchRequest, 'post').and.callFake((url, queryString) => {
167167
let param = JSON.parse(queryString.replace(/\'/g, "\""));
168-
if (url.indexOf(dataServiceURL + "/featureResults.json") > -1 && param.getFeatureMode.indexOf("BUFFER") > -1) {
168+
if (url.indexOf(dataServiceURL + "/featureResults") > -1 && param.getFeatureMode.indexOf("BUFFER") > -1) {
169169
var escapedJson = `{"features":[],"featureUriList":[],"totalCount":0,"featureCount":0}`;
170170
return Promise.resolve(new Response(escapedJson));
171171
}
@@ -209,7 +209,7 @@ describe('leaflet_DataServiceQuery_DataServiceQueryView', () => {
209209
expect(dataServiceQuery).not.toBeNull();
210210
spyOn(FetchRequest, 'post').and.callFake((url, queryString) => {
211211
let param = JSON.parse(queryString.replace(/\'/g, "\""));
212-
if (url.indexOf(dataServiceURL + "/featureResults.json") > -1 && param.getFeatureMode.indexOf("SPATIAL") > -1) {
212+
if (url.indexOf(dataServiceURL + "/featureResults") > -1 && param.getFeatureMode.indexOf("SPATIAL") > -1) {
213213
var escapedJson = `{"features":[] ,"featureUriList":[],"totalCount":0,"featureCount":0}`;
214214
return Promise.resolve(new Response(escapedJson));
215215
}

test/leaflet/components/distributedanalysis/DistributedAnalysisViewSpec.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/leaflet/components/search/SearchViewSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('leaflet_search_SearchView', () => {
6464
var paramsObj = JSON.parse(queryString.replace(/'/g, "\""));
6565
expect(paramsObj.queryMode).toBe("SqlQuery");
6666
expect(paramsObj.queryParameters.queryOption).toBe("ATTRIBUTEANDGEOMETRY");
67-
if (url.indexOf("/queryResults.json") > -1) {
67+
if (url.indexOf("/queryResults") > -1) {
6868
var escapedJson = capitals;
6969
return Promise.resolve(new Response(JSON.stringify(escapedJson)));
7070

test/leaflet/services/GridCellInfosServiceSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ describe('leaflet_GridCellInfosService', () => {
3030
spyOn(FetchRequest, 'commit').and.callFake((method, testUrl, params, options) => {
3131
expect(method).toBe("GET");
3232
expect(options).not.toBeNull();
33-
if (testUrl.indexOf("WorldEarth.json") > 0) {
33+
if (testUrl.indexOf("WorldEarth") > 0) {
3434
return Promise.resolve(new Response(getDatasetInfoEcapedJson));
3535
} else {
36-
if (testUrl.indexOf("imageValue.json") > 0) {
36+
if (testUrl.indexOf("imageValue") > 0) {
3737
return Promise.resolve(new Response(getGridCellInfosEcapedJson));
3838
}
3939
}

test/mapboxgl/services/GridCellInfosServiceSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ describe('mapboxgl_GridCellInfosService', () => {
2828
spyOn(FetchRequest, 'commit').and.callFake((method, testUrl, params, options) => {
2929
expect(method).toBe("GET");
3030
expect(options).not.toBeNull();
31-
if (testUrl.indexOf("WorldEarth.json") > 0) {
31+
if (testUrl.indexOf("WorldEarth") > 0) {
3232
return Promise.resolve(new Response(getDatasetInfoEcapedJson));
3333
} else {
34-
if (testUrl.indexOf("imageValue.json") > 0) {
34+
if (testUrl.indexOf("imageValue") > 0) {
3535
return Promise.resolve(new Response(getGridCellInfosEcapedJson));
3636
}
3737
};

test/openlayers/overlay/VectorTileSuperMapRestSpec_mapboxstyle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('openlayers_VectorTileSuperMapRest', () => {
3434
})
3535
});
3636
spyOn(FetchRequest, 'get').and.callFake((testUrl, params, options) => {
37-
if (testUrl.indexOf("vectorstyles.json") > 0) {
37+
if (testUrl.indexOf("vectorstyles") > 0) {
3838
expect(testUrl).toBe(url + "/tileFeature/vectorstyles?type=MapBox_GL&styleonly=true");
3939
return Promise.resolve(new Response(JSON.stringify(vectorstylesEscapedJson)));
4040
} else if (testUrl.indexOf("sprite.json") > 0) {

test/openlayers/overlay/vectortile/MapboxStylesSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe("openlayers_MapboxStyles", () => {
5454
});
5555
feature3.setId(3);
5656
spyOn(FetchRequest, "get").and.callFake((testUrl, params, options) => {
57-
if (testUrl.indexOf("vectorstyles.json") > 0) {
57+
if (testUrl.indexOf("vectorstyles") > 0) {
5858
expect(testUrl).toBe(url + "/tileFeature/vectorstyles?type=MapBox_GL&styleonly=true");
5959
return Promise.resolve(new Response(JSON.stringify(vectorstylesEscapedJson)));
6060
} else if (testUrl.indexOf("sprite.json") > 0) {

test/openlayers/services/GridCellInfosServiceSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ describe('openlayers_GridCellInfosService', () => {
2828
spyOn(FetchRequest, 'commit').and.callFake((method, testUrl, params, options) => {
2929
expect(method).toBe("GET");
3030
expect(options).not.toBeNull();
31-
if (testUrl.indexOf("WorldEarth.json") > 0) {
31+
if (testUrl.indexOf("WorldEarth") > 0) {
3232
return Promise.resolve(new Response(getDatasetInfoEcapedJson));
3333
} else {
34-
if (testUrl.indexOf("imageValue.json") > 0) {
34+
if (testUrl.indexOf("imageValue") > 0) {
3535
return Promise.resolve(new Response(getGridCellInfosEcapedJson));
3636
}
3737
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy