@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
|
@@ -34,8 +34,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
34
34
|
|
|
35
35
|
it("should initialize with valid data", async () => {
|
|
36
36
|
|
|
37
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
38
|
-
return NewYorkDataset.serviceCapabilities;
|
|
37
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
38
|
+
return {accessTokenRequired: false, content:NewYorkDataset.serviceCapabilities};
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
sandbox.stub(ArcGisFeatureProvider.prototype, "getLayerMetadata" as any).callsFake(async function _(_layerId: number) {
|
|
@@ -52,7 +52,7 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
52
52
|
|
|
53
53
|
it("should not initialize with no service metadata", async () => {
|
|
54
54
|
|
|
55
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
55
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
56
56
|
return undefined;
|
|
57
57
|
});
|
|
58
58
|
|
|
@@ -65,8 +65,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
65
65
|
|
|
66
66
|
it("should update status when invalid token error from service", async () => {
|
|
67
67
|
|
|
68
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
69
|
-
return {error: {code: 499}};
|
|
68
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
69
|
+
return {accessTokenRequired: false, content:{error: {code: 499}}};
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
@@ -80,8 +80,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
80
80
|
|
|
81
81
|
it("should throw query capability not supported", async () => {
|
|
82
82
|
|
|
83
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
84
|
-
return {capabilities: "Test"};
|
|
83
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
84
|
+
return {accessTokenRequired: false, content:{capabilities: "Test"}};
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
@@ -91,8 +91,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
91
91
|
|
|
92
92
|
it("should pick the first visible sub-layer when multiple visible sub-layers", async () => {
|
|
93
93
|
|
|
94
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
95
|
-
return {capabilities: "Query"};
|
|
94
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
95
|
+
return {accessTokenRequired: false, content: {capabilities: "Query"}};
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
const settings = ImageMapLayerSettings.fromJSON({
|
|
@@ -107,8 +107,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
107
107
|
|
|
108
108
|
it("should pick sub-layers from service metadata if none provided on layer settings", async () => {
|
|
109
109
|
|
|
110
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
111
|
-
return {capabilities: "Query",
|
|
110
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
111
|
+
return {accessTokenRequired: false, content: {capabilities: "Query",
|
|
112
112
|
layers: [
|
|
113
113
|
{
|
|
114
114
|
id : 0,
|
|
@@ -117,7 +117,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
117
117
|
{
|
|
118
118
|
id : 1,
|
|
119
119
|
},
|
|
120
|
-
]}
|
|
120
|
+
]},
|
|
121
|
+
};
|
|
121
122
|
});
|
|
122
123
|
|
|
123
124
|
sandbox.stub((ArcGisFeatureProvider.prototype as any), "getLayerMetadata").callsFake(async function (id: number) {
|
|
@@ -137,9 +138,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
137
138
|
|
|
138
139
|
it("should throw error if no layers in capabilities", async () => {
|
|
139
140
|
|
|
140
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
141
|
-
return {capabilities: "Query",
|
|
142
|
-
layers: []};
|
|
141
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
142
|
+
return {accessTokenRequired: false, content: {capabilities: "Query", layers: []}};
|
|
143
143
|
});
|
|
144
144
|
|
|
145
145
|
const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
@@ -154,8 +154,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
154
154
|
subLayers: [{id: 0, name: "layer1", visible:true}, {id:2, name: "layer2", visible:true}]}
|
|
155
155
|
);
|
|
156
156
|
|
|
157
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
158
|
-
return {capabilities: "Query"};
|
|
157
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
158
|
+
return {accessTokenRequired: false, content:{capabilities: "Query"}};
|
|
159
159
|
});
|
|
160
160
|
sandbox.stub((ArcGisFeatureProvider.prototype as any), "getLayerMetadata").callsFake(async function (_id: number) {
|
|
161
161
|
return undefined;
|
|
@@ -176,8 +176,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
176
176
|
return {defaultVisibility:true, supportedQueryFormats:"PBF, JSON"};
|
|
177
177
|
});
|
|
178
178
|
|
|
179
|
-
const getServiceJsonStub = sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
180
|
-
return {capabilities: "Query"};
|
|
179
|
+
const getServiceJsonStub = sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
180
|
+
return {accessTokenRequired: false, content: {capabilities: "Query"}};
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
let provider = new ArcGisFeatureProvider(settings);
|
|
@@ -186,8 +186,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
186
186
|
|
|
187
187
|
// PBF requires 'supportsCoordinatesQuantization'
|
|
188
188
|
getServiceJsonStub.restore();
|
|
189
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
190
|
-
return { currentVersion: 11, capabilities: "Query"};
|
|
189
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
190
|
+
return {accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query"}};
|
|
191
191
|
});
|
|
192
192
|
getLayerMetadataStub.restore();
|
|
193
193
|
getLayerMetadataStub = sandbox.stub((ArcGisFeatureProvider.prototype as any), "getLayerMetadata").callsFake(async function (_id: number) {
|
|
@@ -204,8 +204,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
204
204
|
});
|
|
205
205
|
|
|
206
206
|
getServiceJsonStub.restore();
|
|
207
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
208
|
-
return { currentVersion: 10.91, capabilities: "Query", supportsCoordinatesQuantization:true};
|
|
207
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
208
|
+
return {accessTokenRequired: false, content: { currentVersion: 10.91, capabilities: "Query", supportsCoordinatesQuantization:true}};
|
|
209
209
|
});
|
|
210
210
|
|
|
211
211
|
provider = new ArcGisFeatureProvider(settings);
|
|
@@ -246,8 +246,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
246
246
|
};
|
|
247
247
|
});
|
|
248
248
|
|
|
249
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
250
|
-
return {capabilities: "Query"};
|
|
249
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
250
|
+
return {accessTokenRequired: false, content:{capabilities: "Query"}};
|
|
251
251
|
});
|
|
252
252
|
|
|
253
253
|
const provider = new ArcGisFeatureProvider(settings);
|
|
@@ -279,8 +279,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
279
279
|
};
|
|
280
280
|
});
|
|
281
281
|
|
|
282
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
283
|
-
return {currentVersion: 11, capabilities: "Query"};
|
|
282
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
283
|
+
return {accessTokenRequired: false, content:{currentVersion: 11, capabilities: "Query"}};
|
|
284
284
|
});
|
|
285
285
|
|
|
286
286
|
const provider = new ArcGisFeatureProvider(settings);
|
|
@@ -379,8 +379,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
379
379
|
};
|
|
380
380
|
});
|
|
381
381
|
|
|
382
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
383
|
-
return {currentVersion: 11, capabilities: "Query"};
|
|
382
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
383
|
+
return {accessTokenRequired: false, content:{currentVersion: 11, capabilities: "Query"}};
|
|
384
384
|
});
|
|
385
385
|
sandbox.stub(ArcGisFeatureProvider.prototype, "constructFeatureUrl").callsFake(function _(_row: number, _column: number, _zoomLevel: number, _format: ArcGisFeatureFormat, _geomOverride?: ArcGisGeometry, _outFields?: string, _tolerance?: number, _returnGeometry?: boolean) {
|
|
386
386
|
return undefined;
|
|
@@ -413,8 +413,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
413
413
|
};
|
|
414
414
|
});
|
|
415
415
|
|
|
416
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
417
|
-
return {currentVersion: 11, capabilities: "Query"};
|
|
416
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
417
|
+
return {accessTokenRequired: false, content:{currentVersion: 11, capabilities: "Query"}};
|
|
418
418
|
});
|
|
419
419
|
sandbox.stub((ArcGISImageryProvider.prototype as any), "fetch").callsFake(async function _(_url: URL, _options?: RequestInit) {
|
|
420
420
|
const test = {
|
|
@@ -452,8 +452,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
452
452
|
maxScale: 5000,
|
|
453
453
|
};
|
|
454
454
|
});
|
|
455
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
456
|
-
return {capabilities: "Query"};
|
|
455
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
456
|
+
return {accessTokenRequired: false, content:{capabilities: "Query"}};
|
|
457
457
|
});
|
|
458
458
|
|
|
459
459
|
sandbox.stub((ArcGisFeatureResponse.prototype as any), "getResponseData").callsFake(async function _() {
|
|
@@ -484,8 +484,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
484
484
|
maxScale: 5000,
|
|
485
485
|
};
|
|
486
486
|
});
|
|
487
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
488
|
-
return {capabilities: "Query"};
|
|
487
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
488
|
+
return {accessTokenRequired: false, content:{capabilities: "Query"}};
|
|
489
489
|
});
|
|
490
490
|
|
|
491
491
|
sandbox.stub((ArcGisFeatureResponse.prototype as any), "getResponseData").callsFake(async function _() {
|
|
@@ -516,8 +516,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
516
516
|
maxScale: 5000,
|
|
517
517
|
};
|
|
518
518
|
});
|
|
519
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
520
|
-
return {capabilities: "Query"};
|
|
519
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
520
|
+
return {accessTokenRequired: false, content:{capabilities: "Query"}};
|
|
521
521
|
});
|
|
522
522
|
|
|
523
523
|
sandbox.stub((ArcGisFeatureResponse.prototype as any), "getResponseData").callsFake(async function _() {
|
|
@@ -597,8 +597,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
597
597
|
supportsCoordinatesQuantization:true,
|
|
598
598
|
};
|
|
599
599
|
});
|
|
600
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
601
|
-
return {currentVersion: 11, capabilities: "Query"};
|
|
600
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
601
|
+
return {accessTokenRequired: false, content:{currentVersion: 11, capabilities: "Query"}};
|
|
602
602
|
});
|
|
603
603
|
sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake( function _(_contextId: any, _options?: any) {
|
|
604
604
|
return {} as RenderingContext;
|
|
@@ -646,8 +646,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
646
646
|
supportedQueryFormats:"JSON",
|
|
647
647
|
};
|
|
648
648
|
});
|
|
649
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
650
|
-
return {capabilities: "Query"};
|
|
649
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
650
|
+
return {accessTokenRequired: false, content:{capabilities: "Query"}};
|
|
651
651
|
});
|
|
652
652
|
sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake( function _(_contextId: any, _options?: any) {
|
|
653
653
|
return {} as RenderingContext;
|
|
@@ -693,8 +693,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
693
693
|
supportedQueryFormats:"JSON",
|
|
694
694
|
};
|
|
695
695
|
});
|
|
696
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
697
|
-
return {capabilities: "Query"};
|
|
696
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
697
|
+
return {accessTokenRequired: false, content:{capabilities: "Query"}};
|
|
698
698
|
});
|
|
699
699
|
sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake( function _(_contextId: any, _options?: any) {
|
|
700
700
|
return {} as RenderingContext;
|
|
@@ -783,8 +783,8 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
783
783
|
supportedQueryFormats:"JSON",
|
|
784
784
|
};
|
|
785
785
|
});
|
|
786
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
787
|
-
return {capabilities: "Query"};
|
|
786
|
+
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
|
|
787
|
+
return {accessTokenRequired: false, content:{capabilities: "Query"}};
|
|
788
788
|
});
|
|
789
789
|
const fetchStub = sandbox.stub((ArcGISImageryProvider.prototype as any), "fetch");
|
|
790
790
|
|