Skip to content

Commit 38dc236

Browse files
committed
fix ci ut 失败 review by songym
1 parent ab47496 commit 38dc236

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

test/leaflet/services/LayerInfoServiceSpec.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,19 @@ describe('leaflet_LayerInfoService', () => {
203203
});
204204

205205
//设置图层信息服务 并实现临时图层中子图层的修改
206-
xit('setLayerInfo', (done) => {
206+
it('setLayerInfo', (done) => {
207207
var layers = layerInfo;
208208
layers.description = "this is a test";
209209
var setLayerInfoParams = new SetLayerInfoParameters({
210-
tempLayerName: "continent_T@World.1@@World Map",
210+
tempLayerName: "continent_T@World.1@@World",
211211
resourceID: id,
212212
layerInfo: layers
213213
});
214+
spyOn(FetchRequest, 'put').and.callFake((testUrl) => {
215+
expect(testUrl).toContain("/tempLayersSet/c01d29d8d41743adb673cd1cecda6ed0_1c0bda07fde943a4a5f3f3d4eb44235d/continent_T@World.1@@World.json");
216+
expect(options).not.toBeNull();
217+
return Promise.resolve(new Response(`{"succeed":true,"newResourceLocation":"http://localhost:8090/iserver/services/map-world/rest/maps/World Map/tempLayersSet/c01d29d8d41743adb673cd1cecda6ed0_1c0bda07fde943a4a5f3f3d4eb44235d/continent_T@World.1@@World"}`));
218+
});
214219
var service = layerInfoService(layerInfoURL);
215220
service.setLayerInfo(setLayerInfoParams, (result) => {
216221
serviceResult = result

test/mapboxgl/services/LayerInfoServiceSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ describe('mapboxgl_LayerInfoService', () => {
162162
var layers = layerInfo;
163163
layers.description = "this is a test";
164164
var setLayerInfoParameters = new SetLayerInfoParameters({
165-
tempLayerName: "continent_T@World.1@@World Map",
165+
tempLayerName: "continent_T@World.1@@World",
166166
resourceID: id,
167167
layerInfo: layers
168168
});

test/openlayers/services/LayerInfoServiceSpec.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,19 @@ describe('openlayers_LayerInfoService', () => {
196196
});
197197

198198
//设置图层信息服务 并实现临时图层中子图层的修改
199-
xit('setLayerInfo', (done) => {
199+
it('setLayerInfo', (done) => {
200200
var layers = layerInfo;
201201
layers.description = "this is a test";
202202
var setLayerInfoParameters = new SetLayerInfoParameters({
203-
tempLayerName: "continent_T@World.1@@World Map",
203+
tempLayerName: "continent_T@World.1@@World",
204204
resourceID: id,
205205
layerInfo: layers
206206
});
207+
spyOn(FetchRequest, 'put').and.callFake((testUrl) => {
208+
expect(testUrl).toContain("/tempLayersSet/c01d29d8d41743adb673cd1cecda6ed0_1c0bda07fde943a4a5f3f3d4eb44235d/continent_T@World.1@@World.json");
209+
expect(options).not.toBeNull();
210+
return Promise.resolve(new Response(`{"succeed":true,"newResourceLocation":"http://localhost:8090/iserver/services/map-world/rest/maps/World Map/tempLayersSet/c01d29d8d41743adb673cd1cecda6ed0_1c0bda07fde943a4a5f3f3d4eb44235d/continent_T@World.1@@World"}`));
211+
});
207212
var service = new LayerInfoService(url);
208213
service.setLayerInfo(setLayerInfoParameters, (result) => {
209214
serviceResult = result

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