@itwin/map-layers-formats 3.6.0-dev.55 → 3.6.0-dev.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rush/temp/operation/build_ci/state.json +1 -1
- package/.rush/temp/operation/docs/state.json +1 -1
- package/.rush/temp/package-deps_build_ci.json +4 -4
- package/.rush/temp/package-deps_docs.json +4 -4
- package/.rush/temp/shrinkwrap-deps.json +5 -5
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +9 -13
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js +52 -52
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
- package/lib/cjs/test/coverage/.nyc_output/2bda7ab7-82c6-4d7d-b758-30340004d0b5.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/{2e291683-2552-4859-b946-16d4666924d7.json → c0daf676-df75-45c2-af93-2b87e27d5210.json} +0 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/2bda7ab7-82c6-4d7d-b758-30340004d0b5.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/c0daf676-df75-45c2-af93-2b87e27d5210.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +1 -1
- package/lib/cjs/test/coverage/cobertura-coverage.xml +210 -210
- package/lib/cjs/test/coverage/lcov-report/index.html +5 -5
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureFormat.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureJSON.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeaturePBF.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +10 -28
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureQuery.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureReader.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureRenderer.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureResponse.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisSymbologyRenderer.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/index.html +5 -5
- package/lib/cjs/test/coverage/lcov-report/src/index.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/map-layers-formats.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/mapLayersFormats.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov.info +375 -367
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +9 -13
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js +52 -52
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/test/junit_results.xml +46 -46
- package/map-layers-formats.build.log +2 -2
- package/package.json +12 -12
- package/src/ArcGisFeature/ArcGisFeatureProvider.ts +6 -12
- package/src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts +45 -45
- package/lib/cjs/test/coverage/.nyc_output/94497f66-5c99-4c6a-ac1a-b879d84f0639.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/2e291683-2552-4859-b946-16d4666924d7.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/94497f66-5c99-4c6a-ac1a-b879d84f0639.json +0 -1
|
@@ -28,8 +28,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
28
28
|
sandbox.restore();
|
|
29
29
|
});
|
|
30
30
|
it("should initialize with valid data", async () => {
|
|
31
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
32
|
-
return NewYorkDataset_1.NewYorkDataset.serviceCapabilities;
|
|
31
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
32
|
+
return { accessTokenRequired: false, content: NewYorkDataset_1.NewYorkDataset.serviceCapabilities };
|
|
33
33
|
});
|
|
34
34
|
sandbox.stub(map_layers_formats_1.ArcGisFeatureProvider.prototype, "getLayerMetadata").callsFake(async function _(_layerId) {
|
|
35
35
|
return NewYorkDataset_1.NewYorkDataset.streetsLayerCapabilities;
|
|
@@ -41,7 +41,7 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
41
41
|
expect(provider._maxDepthFromLod).to.equals(22);
|
|
42
42
|
});
|
|
43
43
|
it("should not initialize with no service metadata", async () => {
|
|
44
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
44
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
45
45
|
return undefined;
|
|
46
46
|
});
|
|
47
47
|
const settings = core_common_1.ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
@@ -49,8 +49,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
49
49
|
await expect(provider.initialize()).to.be.rejectedWith(core_common_1.ServerError);
|
|
50
50
|
});
|
|
51
51
|
it("should update status when invalid token error from service", async () => {
|
|
52
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
53
|
-
return { error: { code: 499 } };
|
|
52
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
53
|
+
return { accessTokenRequired: false, content: { error: { code: 499 } } };
|
|
54
54
|
});
|
|
55
55
|
const settings = core_common_1.ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
56
56
|
const provider = new map_layers_formats_1.ArcGisFeatureProvider(settings);
|
|
@@ -60,16 +60,16 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
60
60
|
expect(raiseEventSpy.calledOnceWith(provider)).to.be.true;
|
|
61
61
|
});
|
|
62
62
|
it("should throw query capability not supported", async () => {
|
|
63
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
64
|
-
return { capabilities: "Test" };
|
|
63
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
64
|
+
return { accessTokenRequired: false, content: { capabilities: "Test" } };
|
|
65
65
|
});
|
|
66
66
|
const settings = core_common_1.ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
67
67
|
const provider = new map_layers_formats_1.ArcGisFeatureProvider(settings);
|
|
68
68
|
await expect(provider.initialize()).to.be.rejectedWith(core_common_1.ServerError);
|
|
69
69
|
});
|
|
70
70
|
it("should pick the first visible sub-layer when multiple visible sub-layers", async () => {
|
|
71
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
72
|
-
return { capabilities: "Query" };
|
|
71
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
72
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
73
73
|
});
|
|
74
74
|
const settings = core_common_1.ImageMapLayerSettings.fromJSON({
|
|
75
75
|
...esriFeatureSampleSource,
|
|
@@ -81,16 +81,17 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
81
81
|
expect(provider._layerId).to.equals(settings.subLayers[0].id);
|
|
82
82
|
});
|
|
83
83
|
it("should pick sub-layers from service metadata if none provided on layer settings", async () => {
|
|
84
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
85
|
-
return { capabilities: "Query",
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
85
|
+
return { accessTokenRequired: false, content: { capabilities: "Query",
|
|
86
|
+
layers: [
|
|
87
|
+
{
|
|
88
|
+
id: 0,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: 1,
|
|
92
|
+
},
|
|
93
|
+
] },
|
|
94
|
+
};
|
|
94
95
|
});
|
|
95
96
|
sandbox.stub(map_layers_formats_1.ArcGisFeatureProvider.prototype, "getLayerMetadata").callsFake(async function (id) {
|
|
96
97
|
if (id === 1) {
|
|
@@ -106,9 +107,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
106
107
|
expect(provider._layerMetadata).to.eql({ defaultVisibility: true });
|
|
107
108
|
});
|
|
108
109
|
it("should throw error if no layers in capabilities", async () => {
|
|
109
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
110
|
-
return { capabilities: "Query",
|
|
111
|
-
layers: [] };
|
|
110
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
111
|
+
return { accessTokenRequired: false, content: { capabilities: "Query", layers: [] } };
|
|
112
112
|
});
|
|
113
113
|
const settings = core_common_1.ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
114
114
|
const provider = new map_layers_formats_1.ArcGisFeatureProvider(settings);
|
|
@@ -119,8 +119,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
119
119
|
...esriFeatureSampleSource,
|
|
120
120
|
subLayers: [{ id: 0, name: "layer1", visible: true }, { id: 2, name: "layer2", visible: true }]
|
|
121
121
|
});
|
|
122
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
123
|
-
return { capabilities: "Query" };
|
|
122
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
123
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
124
124
|
});
|
|
125
125
|
sandbox.stub(map_layers_formats_1.ArcGisFeatureProvider.prototype, "getLayerMetadata").callsFake(async function (_id) {
|
|
126
126
|
return undefined;
|
|
@@ -136,16 +136,16 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
136
136
|
let getLayerMetadataStub = sandbox.stub(map_layers_formats_1.ArcGisFeatureProvider.prototype, "getLayerMetadata").callsFake(async function (_id) {
|
|
137
137
|
return { defaultVisibility: true, supportedQueryFormats: "PBF, JSON" };
|
|
138
138
|
});
|
|
139
|
-
const getServiceJsonStub = sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
140
|
-
return { capabilities: "Query" };
|
|
139
|
+
const getServiceJsonStub = sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
140
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
141
141
|
});
|
|
142
142
|
let provider = new map_layers_formats_1.ArcGisFeatureProvider(settings);
|
|
143
143
|
await provider.initialize();
|
|
144
144
|
expect(provider.format).to.equals("JSON");
|
|
145
145
|
// PBF requires 'supportsCoordinatesQuantization'
|
|
146
146
|
getServiceJsonStub.restore();
|
|
147
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
148
|
-
return { currentVersion: 11, capabilities: "Query" };
|
|
147
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
148
|
+
return { accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query" } };
|
|
149
149
|
});
|
|
150
150
|
getLayerMetadataStub.restore();
|
|
151
151
|
getLayerMetadataStub = sandbox.stub(map_layers_formats_1.ArcGisFeatureProvider.prototype, "getLayerMetadata").callsFake(async function (_id) {
|
|
@@ -159,8 +159,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
159
159
|
return { defaultVisibility: true, supportedQueryFormats: "JSON" };
|
|
160
160
|
});
|
|
161
161
|
getServiceJsonStub.restore();
|
|
162
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
163
|
-
return { currentVersion: 10.91, capabilities: "Query", supportsCoordinatesQuantization: true };
|
|
162
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
163
|
+
return { accessTokenRequired: false, content: { currentVersion: 10.91, capabilities: "Query", supportsCoordinatesQuantization: true } };
|
|
164
164
|
});
|
|
165
165
|
provider = new map_layers_formats_1.ArcGisFeatureProvider(settings);
|
|
166
166
|
await provider.initialize();
|
|
@@ -192,8 +192,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
192
192
|
maxScale: 5000,
|
|
193
193
|
};
|
|
194
194
|
});
|
|
195
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
196
|
-
return { capabilities: "Query" };
|
|
195
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
196
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
197
197
|
});
|
|
198
198
|
const provider = new map_layers_formats_1.ArcGisFeatureProvider(settings);
|
|
199
199
|
await provider.initialize();
|
|
@@ -218,8 +218,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
218
218
|
supportedQueryFormats: "PBF, JSON",
|
|
219
219
|
};
|
|
220
220
|
});
|
|
221
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
222
|
-
return { currentVersion: 11, capabilities: "Query" };
|
|
221
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
222
|
+
return { accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query" } };
|
|
223
223
|
});
|
|
224
224
|
const provider = new map_layers_formats_1.ArcGisFeatureProvider(settings);
|
|
225
225
|
await provider.initialize();
|
|
@@ -307,8 +307,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
307
307
|
maxScale: 5000,
|
|
308
308
|
};
|
|
309
309
|
});
|
|
310
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
311
|
-
return { currentVersion: 11, capabilities: "Query" };
|
|
310
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
311
|
+
return { accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query" } };
|
|
312
312
|
});
|
|
313
313
|
sandbox.stub(map_layers_formats_1.ArcGisFeatureProvider.prototype, "constructFeatureUrl").callsFake(function _(_row, _column, _zoomLevel, _format, _geomOverride, _outFields, _tolerance, _returnGeometry) {
|
|
314
314
|
return undefined;
|
|
@@ -335,8 +335,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
335
335
|
maxScale: 5000,
|
|
336
336
|
};
|
|
337
337
|
});
|
|
338
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
339
|
-
return { currentVersion: 11, capabilities: "Query" };
|
|
338
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
339
|
+
return { accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query" } };
|
|
340
340
|
});
|
|
341
341
|
sandbox.stub(core_frontend_1.ArcGISImageryProvider.prototype, "fetch").callsFake(async function _(_url, _options) {
|
|
342
342
|
const test = {
|
|
@@ -370,8 +370,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
370
370
|
maxScale: 5000,
|
|
371
371
|
};
|
|
372
372
|
});
|
|
373
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
374
|
-
return { capabilities: "Query" };
|
|
373
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
374
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
375
375
|
});
|
|
376
376
|
sandbox.stub(ArcGisFeatureResponse_1.ArcGisFeatureResponse.prototype, "getResponseData").callsFake(async function _() {
|
|
377
377
|
return { exceedTransferLimit: true, data: undefined };
|
|
@@ -397,8 +397,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
397
397
|
maxScale: 5000,
|
|
398
398
|
};
|
|
399
399
|
});
|
|
400
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
401
|
-
return { capabilities: "Query" };
|
|
400
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
401
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
402
402
|
});
|
|
403
403
|
sandbox.stub(ArcGisFeatureResponse_1.ArcGisFeatureResponse.prototype, "getResponseData").callsFake(async function _() {
|
|
404
404
|
throw new Error();
|
|
@@ -424,8 +424,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
424
424
|
maxScale: 5000,
|
|
425
425
|
};
|
|
426
426
|
});
|
|
427
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
428
|
-
return { capabilities: "Query" };
|
|
427
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
428
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
429
429
|
});
|
|
430
430
|
sandbox.stub(ArcGisFeatureResponse_1.ArcGisFeatureResponse.prototype, "getResponseData").callsFake(async function _() {
|
|
431
431
|
return { data: {
|
|
@@ -494,8 +494,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
494
494
|
supportsCoordinatesQuantization: true,
|
|
495
495
|
};
|
|
496
496
|
});
|
|
497
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
498
|
-
return { currentVersion: 11, capabilities: "Query" };
|
|
497
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
498
|
+
return { accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query" } };
|
|
499
499
|
});
|
|
500
500
|
sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake(function _(_contextId, _options) {
|
|
501
501
|
return {};
|
|
@@ -537,8 +537,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
537
537
|
supportedQueryFormats: "JSON",
|
|
538
538
|
};
|
|
539
539
|
});
|
|
540
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
541
|
-
return { capabilities: "Query" };
|
|
540
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
541
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
542
542
|
});
|
|
543
543
|
sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake(function _(_contextId, _options) {
|
|
544
544
|
return {};
|
|
@@ -579,8 +579,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
579
579
|
supportedQueryFormats: "JSON",
|
|
580
580
|
};
|
|
581
581
|
});
|
|
582
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
583
|
-
return { capabilities: "Query" };
|
|
582
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
583
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
584
584
|
});
|
|
585
585
|
sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake(function _(_contextId, _options) {
|
|
586
586
|
return {};
|
|
@@ -662,8 +662,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
662
662
|
supportedQueryFormats: "JSON",
|
|
663
663
|
};
|
|
664
664
|
});
|
|
665
|
-
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
666
|
-
return { capabilities: "Query" };
|
|
665
|
+
sandbox.stub(core_frontend_1.ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
666
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
667
667
|
});
|
|
668
668
|
const fetchStub = sandbox.stub(core_frontend_1.ArcGISImageryProvider.prototype, "fetch");
|
|
669
669
|
sandbox.stub(map_layers_formats_1.ArcGisFeatureProvider.prototype, "constructFeatureUrl").callsFake(function _(_row, _column, _zoomLevel, _format, _geomOverride, _outFields, _tolerance, _returnGeometry) {
|