@itwin/map-layers-formats 3.6.0-dev.8 → 4.0.0-dev.10
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/cover/state.json +3 -0
- package/.rush/temp/operation/docs/state.json +1 -1
- package/.rush/temp/package-deps_build_ci.json +8 -7
- package/.rush/temp/package-deps_cover.json +36 -0
- package/.rush/temp/package-deps_docs.json +8 -7
- package/.rush/temp/shrinkwrap-deps.json +25 -23
- package/CHANGELOG.json +30 -0
- package/CHANGELOG.md +26 -1
- package/config/rush-project.json +7 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js +1 -4
- package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +10 -19
- 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/{5915ac9b-d491-4417-9c9b-5f1c8af16991.json → 83bd5493-125e-4bb5-82e8-0cfcb3eac657.json} +0 -0
- package/lib/cjs/test/coverage/.nyc_output/c1854e0d-b6d0-4044-9478-d969081f8754.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/83bd5493-125e-4bb5-82e8-0cfcb3eac657.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/c1854e0d-b6d0-4044-9478-d969081f8754.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +1 -1
- package/lib/cjs/test/coverage/cobertura-coverage.xml +300 -308
- package/lib/cjs/test/coverage/lcov-report/index.html +14 -14
- 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 +10 -16
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +16 -49
- 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 +21 -21
- 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 +569 -569
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js +2 -5
- package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +11 -20
- 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 +45 -45
- package/map-layers-formats.build.log +2 -2
- package/package.json +12 -12
- package/src/ArcGisFeature/ArcGisFeaturePBF.ts +3 -5
- package/src/ArcGisFeature/ArcGisFeatureProvider.ts +8 -19
- package/src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts +45 -45
- package/lib/cjs/test/coverage/.nyc_output/f467b483-7a60-4740-a604-ffc7965ecd6c.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/5915ac9b-d491-4417-9c9b-5f1c8af16991.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/f467b483-7a60-4740-a604-ffc7965ecd6c.json +0 -1
|
@@ -26,8 +26,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
26
26
|
sandbox.restore();
|
|
27
27
|
});
|
|
28
28
|
it("should initialize with valid data", async () => {
|
|
29
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
30
|
-
return NewYorkDataset.serviceCapabilities;
|
|
29
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
30
|
+
return { accessTokenRequired: false, content: NewYorkDataset.serviceCapabilities };
|
|
31
31
|
});
|
|
32
32
|
sandbox.stub(ArcGisFeatureProvider.prototype, "getLayerMetadata").callsFake(async function _(_layerId) {
|
|
33
33
|
return NewYorkDataset.streetsLayerCapabilities;
|
|
@@ -39,7 +39,7 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
39
39
|
expect(provider._maxDepthFromLod).to.equals(22);
|
|
40
40
|
});
|
|
41
41
|
it("should not initialize with no service metadata", async () => {
|
|
42
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
42
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
43
43
|
return undefined;
|
|
44
44
|
});
|
|
45
45
|
const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
@@ -47,8 +47,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
47
47
|
await expect(provider.initialize()).to.be.rejectedWith(ServerError);
|
|
48
48
|
});
|
|
49
49
|
it("should update status when invalid token error from service", async () => {
|
|
50
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
51
|
-
return { error: { code: 499 } };
|
|
50
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
51
|
+
return { accessTokenRequired: false, content: { error: { code: 499 } } };
|
|
52
52
|
});
|
|
53
53
|
const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
54
54
|
const provider = new ArcGisFeatureProvider(settings);
|
|
@@ -58,16 +58,16 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
58
58
|
expect(raiseEventSpy.calledOnceWith(provider)).to.be.true;
|
|
59
59
|
});
|
|
60
60
|
it("should throw query capability not supported", async () => {
|
|
61
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
62
|
-
return { capabilities: "Test" };
|
|
61
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
62
|
+
return { accessTokenRequired: false, content: { capabilities: "Test" } };
|
|
63
63
|
});
|
|
64
64
|
const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
65
65
|
const provider = new ArcGisFeatureProvider(settings);
|
|
66
66
|
await expect(provider.initialize()).to.be.rejectedWith(ServerError);
|
|
67
67
|
});
|
|
68
68
|
it("should pick the first visible sub-layer when multiple visible sub-layers", async () => {
|
|
69
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
70
|
-
return { capabilities: "Query" };
|
|
69
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
70
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
71
71
|
});
|
|
72
72
|
const settings = ImageMapLayerSettings.fromJSON({
|
|
73
73
|
...esriFeatureSampleSource,
|
|
@@ -79,16 +79,17 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
79
79
|
expect(provider._layerId).to.equals(settings.subLayers[0].id);
|
|
80
80
|
});
|
|
81
81
|
it("should pick sub-layers from service metadata if none provided on layer settings", async () => {
|
|
82
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
83
|
-
return { capabilities: "Query",
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
82
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
83
|
+
return { accessTokenRequired: false, content: { capabilities: "Query",
|
|
84
|
+
layers: [
|
|
85
|
+
{
|
|
86
|
+
id: 0,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 1,
|
|
90
|
+
},
|
|
91
|
+
] },
|
|
92
|
+
};
|
|
92
93
|
});
|
|
93
94
|
sandbox.stub(ArcGisFeatureProvider.prototype, "getLayerMetadata").callsFake(async function (id) {
|
|
94
95
|
if (id === 1) {
|
|
@@ -104,9 +105,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
104
105
|
expect(provider._layerMetadata).to.eql({ defaultVisibility: true });
|
|
105
106
|
});
|
|
106
107
|
it("should throw error if no layers in capabilities", async () => {
|
|
107
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
108
|
-
return { capabilities: "Query",
|
|
109
|
-
layers: [] };
|
|
108
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
109
|
+
return { accessTokenRequired: false, content: { capabilities: "Query", layers: [] } };
|
|
110
110
|
});
|
|
111
111
|
const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
112
112
|
const provider = new ArcGisFeatureProvider(settings);
|
|
@@ -117,8 +117,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
117
117
|
...esriFeatureSampleSource,
|
|
118
118
|
subLayers: [{ id: 0, name: "layer1", visible: true }, { id: 2, name: "layer2", visible: true }]
|
|
119
119
|
});
|
|
120
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
121
|
-
return { capabilities: "Query" };
|
|
120
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
121
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
122
122
|
});
|
|
123
123
|
sandbox.stub(ArcGisFeatureProvider.prototype, "getLayerMetadata").callsFake(async function (_id) {
|
|
124
124
|
return undefined;
|
|
@@ -134,16 +134,16 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
134
134
|
let getLayerMetadataStub = sandbox.stub(ArcGisFeatureProvider.prototype, "getLayerMetadata").callsFake(async function (_id) {
|
|
135
135
|
return { defaultVisibility: true, supportedQueryFormats: "PBF, JSON" };
|
|
136
136
|
});
|
|
137
|
-
const getServiceJsonStub = sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
138
|
-
return { capabilities: "Query" };
|
|
137
|
+
const getServiceJsonStub = sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
138
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
139
139
|
});
|
|
140
140
|
let provider = new ArcGisFeatureProvider(settings);
|
|
141
141
|
await provider.initialize();
|
|
142
142
|
expect(provider.format).to.equals("JSON");
|
|
143
143
|
// PBF requires 'supportsCoordinatesQuantization'
|
|
144
144
|
getServiceJsonStub.restore();
|
|
145
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
146
|
-
return { currentVersion: 11, capabilities: "Query" };
|
|
145
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
146
|
+
return { accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query" } };
|
|
147
147
|
});
|
|
148
148
|
getLayerMetadataStub.restore();
|
|
149
149
|
getLayerMetadataStub = sandbox.stub(ArcGisFeatureProvider.prototype, "getLayerMetadata").callsFake(async function (_id) {
|
|
@@ -157,8 +157,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
157
157
|
return { defaultVisibility: true, supportedQueryFormats: "JSON" };
|
|
158
158
|
});
|
|
159
159
|
getServiceJsonStub.restore();
|
|
160
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
161
|
-
return { currentVersion: 10.91, capabilities: "Query", supportsCoordinatesQuantization: true };
|
|
160
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
161
|
+
return { accessTokenRequired: false, content: { currentVersion: 10.91, capabilities: "Query", supportsCoordinatesQuantization: true } };
|
|
162
162
|
});
|
|
163
163
|
provider = new ArcGisFeatureProvider(settings);
|
|
164
164
|
await provider.initialize();
|
|
@@ -190,8 +190,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
190
190
|
maxScale: 5000,
|
|
191
191
|
};
|
|
192
192
|
});
|
|
193
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
194
|
-
return { capabilities: "Query" };
|
|
193
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
194
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
195
195
|
});
|
|
196
196
|
const provider = new ArcGisFeatureProvider(settings);
|
|
197
197
|
await provider.initialize();
|
|
@@ -216,8 +216,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
216
216
|
supportedQueryFormats: "PBF, JSON",
|
|
217
217
|
};
|
|
218
218
|
});
|
|
219
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
220
|
-
return { currentVersion: 11, capabilities: "Query" };
|
|
219
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
220
|
+
return { accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query" } };
|
|
221
221
|
});
|
|
222
222
|
const provider = new ArcGisFeatureProvider(settings);
|
|
223
223
|
await provider.initialize();
|
|
@@ -305,8 +305,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
305
305
|
maxScale: 5000,
|
|
306
306
|
};
|
|
307
307
|
});
|
|
308
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
309
|
-
return { currentVersion: 11, capabilities: "Query" };
|
|
308
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
309
|
+
return { accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query" } };
|
|
310
310
|
});
|
|
311
311
|
sandbox.stub(ArcGisFeatureProvider.prototype, "constructFeatureUrl").callsFake(function _(_row, _column, _zoomLevel, _format, _geomOverride, _outFields, _tolerance, _returnGeometry) {
|
|
312
312
|
return undefined;
|
|
@@ -333,8 +333,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
333
333
|
maxScale: 5000,
|
|
334
334
|
};
|
|
335
335
|
});
|
|
336
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
337
|
-
return { currentVersion: 11, capabilities: "Query" };
|
|
336
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
337
|
+
return { accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query" } };
|
|
338
338
|
});
|
|
339
339
|
sandbox.stub(ArcGISImageryProvider.prototype, "fetch").callsFake(async function _(_url, _options) {
|
|
340
340
|
const test = {
|
|
@@ -368,8 +368,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
368
368
|
maxScale: 5000,
|
|
369
369
|
};
|
|
370
370
|
});
|
|
371
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
372
|
-
return { capabilities: "Query" };
|
|
371
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
372
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
373
373
|
});
|
|
374
374
|
sandbox.stub(ArcGisFeatureResponse.prototype, "getResponseData").callsFake(async function _() {
|
|
375
375
|
return { exceedTransferLimit: true, data: undefined };
|
|
@@ -395,8 +395,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
395
395
|
maxScale: 5000,
|
|
396
396
|
};
|
|
397
397
|
});
|
|
398
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
399
|
-
return { capabilities: "Query" };
|
|
398
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
399
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
400
400
|
});
|
|
401
401
|
sandbox.stub(ArcGisFeatureResponse.prototype, "getResponseData").callsFake(async function _() {
|
|
402
402
|
throw new Error();
|
|
@@ -422,8 +422,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
422
422
|
maxScale: 5000,
|
|
423
423
|
};
|
|
424
424
|
});
|
|
425
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
426
|
-
return { capabilities: "Query" };
|
|
425
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
426
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
427
427
|
});
|
|
428
428
|
sandbox.stub(ArcGisFeatureResponse.prototype, "getResponseData").callsFake(async function _() {
|
|
429
429
|
return { data: {
|
|
@@ -492,8 +492,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
492
492
|
supportsCoordinatesQuantization: true,
|
|
493
493
|
};
|
|
494
494
|
});
|
|
495
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
496
|
-
return { currentVersion: 11, capabilities: "Query" };
|
|
495
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
496
|
+
return { accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query" } };
|
|
497
497
|
});
|
|
498
498
|
sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake(function _(_contextId, _options) {
|
|
499
499
|
return {};
|
|
@@ -535,8 +535,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
535
535
|
supportedQueryFormats: "JSON",
|
|
536
536
|
};
|
|
537
537
|
});
|
|
538
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
539
|
-
return { capabilities: "Query" };
|
|
538
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
539
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
540
540
|
});
|
|
541
541
|
sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake(function _(_contextId, _options) {
|
|
542
542
|
return {};
|
|
@@ -577,8 +577,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
577
577
|
supportedQueryFormats: "JSON",
|
|
578
578
|
};
|
|
579
579
|
});
|
|
580
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
581
|
-
return { capabilities: "Query" };
|
|
580
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
581
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
582
582
|
});
|
|
583
583
|
sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake(function _(_contextId, _options) {
|
|
584
584
|
return {};
|
|
@@ -660,8 +660,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
660
660
|
supportedQueryFormats: "JSON",
|
|
661
661
|
};
|
|
662
662
|
});
|
|
663
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache) {
|
|
664
|
-
return { capabilities: "Query" };
|
|
663
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url, _formatId, _userName, _password, _ignoreCache, _requireToken) {
|
|
664
|
+
return { accessTokenRequired: false, content: { capabilities: "Query" } };
|
|
665
665
|
});
|
|
666
666
|
const fetchStub = sandbox.stub(ArcGISImageryProvider.prototype, "fetch");
|
|
667
667
|
sandbox.stub(ArcGisFeatureProvider.prototype, "constructFeatureUrl").callsFake(function _(_row, _column, _zoomLevel, _format, _geomOverride, _outFields, _tolerance, _returnGeometry) {
|