From a2084ad6ec9b3f73c85d01b5fc751e2a0472be11 Mon Sep 17 00:00:00 2001 From: shallowdream Date: Thu, 28 Mar 2024 13:59:08 +0800 Subject: [PATCH] add ut --- .../iServer/AttachmentsParametersSpec.js | 20 +++++++ .../iServer/EditAttachmentsParametersSpec.js | 20 +++++++ .../services/EditFeatureAttachmentsSpec.js | 55 +++++++++++++++++++ .../services/GetFeatureAttachmentsSpec.js | 47 ++++++++++++++++ .../services/EditFeatureAttachmentsSpec.js | 55 +++++++++++++++++++ .../services/GetFeatureAttachmentsSpec.js | 47 ++++++++++++++++ .../services/EditFeatureAttachmentsSpec.js | 55 +++++++++++++++++++ .../services/GetFeatureAttachmentsSpec.js | 47 ++++++++++++++++ .../services/EditFeatureAttachmentsSpec.js | 55 +++++++++++++++++++ .../services/GetFeatureAttachmentsSpec.js | 47 ++++++++++++++++ test/test-main-common.js | 3 +- test/test-main-leaflet.js | 2 + test/test-main-mapboxgl.js | 3 +- test/test-main-maplibregl.js | 2 + test/test-main-openlayers.js | 3 +- 15 files changed, 458 insertions(+), 3 deletions(-) create mode 100644 test/common/iServer/AttachmentsParametersSpec.js create mode 100644 test/common/iServer/EditAttachmentsParametersSpec.js create mode 100644 test/leaflet/services/EditFeatureAttachmentsSpec.js create mode 100644 test/leaflet/services/GetFeatureAttachmentsSpec.js create mode 100644 test/mapboxgl/services/EditFeatureAttachmentsSpec.js create mode 100644 test/mapboxgl/services/GetFeatureAttachmentsSpec.js create mode 100644 test/maplibregl/services/EditFeatureAttachmentsSpec.js create mode 100644 test/maplibregl/services/GetFeatureAttachmentsSpec.js create mode 100644 test/openlayers/services/EditFeatureAttachmentsSpec.js create mode 100644 test/openlayers/services/GetFeatureAttachmentsSpec.js diff --git a/test/common/iServer/AttachmentsParametersSpec.js b/test/common/iServer/AttachmentsParametersSpec.js new file mode 100644 index 000000000..f5b340ec1 --- /dev/null +++ b/test/common/iServer/AttachmentsParametersSpec.js @@ -0,0 +1,20 @@ +import { AttachmentsParameters } from '../../../src/common/iServer'; +describe('AttachmentsParameters', () => { + it('constructor destroy', () => { + var option = { + dataSourceName: 'testDataSourceName', + dataSetName: 'testDataSetName', + featureId: '1', + }; + var parametersNull = new AttachmentsParameters(); + expect(parametersNull).not.toBeNull(); + var parameter = new AttachmentsParameters(option); + expect(parameter.dataSourceName).toEqual('testDataSourceName'); + expect(parameter.dataSetName).toEqual('testDataSetName'); + expect(parameter.featureId).toEqual('1'); + parameter.destroy(); + expect(parameter.dataSourceName).toBeNull(); + expect(parameter.dataSetName).toBeNull(); + expect(parameter.featureId).toBeNull(); + }); +}); \ No newline at end of file diff --git a/test/common/iServer/EditAttachmentsParametersSpec.js b/test/common/iServer/EditAttachmentsParametersSpec.js new file mode 100644 index 000000000..94e7c50f3 --- /dev/null +++ b/test/common/iServer/EditAttachmentsParametersSpec.js @@ -0,0 +1,20 @@ +import { EditAttachmentsParameters } from '../../../src/common/iServer'; +describe('EditAttachmentsParameters', () => { + it('constructor destroy', () => { + var option = { + file: new File(['file1 contents'], 'file1.txt', { type: 'text/plain' }), + IDs: [1,2], + editType: 'ADD', + }; + var parametersNull = new EditAttachmentsParameters(); + expect(parametersNull).not.toBeNull(); + var parameter = new EditAttachmentsParameters(option); + expect(parameter.file).not.toBeNull(); + expect(parameter.IDs).toEqual([1,2]); + expect(parameter.editType).toEqual('ADD'); + parameter.destroy(); + expect(parameter.file).toBeNull(); + expect(parameter.IDs).toBeNull(); + expect(parameter.editType).toBeNull(); + }); +}); \ No newline at end of file diff --git a/test/leaflet/services/EditFeatureAttachmentsSpec.js b/test/leaflet/services/EditFeatureAttachmentsSpec.js new file mode 100644 index 000000000..af3e794d5 --- /dev/null +++ b/test/leaflet/services/EditFeatureAttachmentsSpec.js @@ -0,0 +1,55 @@ +import { FeatureService } from '../../../src/leaflet/services/FeatureService'; +import { EditAttachmentsParameters } from '../../../src/common/iServer/EditAttachmentsParameters'; +import { FetchRequest } from '../../../src/common/util/FetchRequest'; + +var url = GlobeParameter.dataServiceURL; +describe('leaflet_GetFeatureAttachments', () => { + var originalTimeout; + beforeEach(() => { + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000; + }); + afterEach(() => { + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + }); + + it('incomplete parameters', done => { + let params = new EditAttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + }); + var editFeatureAttachmentsService = new FeatureService(url, {}); + spyOn(FetchRequest, 'commit'); + editFeatureAttachmentsService.editFeatureAttachments(params); + expect(FetchRequest.commit).not.toHaveBeenCalled(); + done(); + }); + it('complete parameters and add a file', done => { + let file = new File(['file1 contents'], 'file1.txt', { type: 'text/plain' }); + let params = new EditAttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + featureId: 1, + file:file + }); + let myService = new FeatureService(url) + spyOn(FetchRequest, 'commit').and.callFake((method, url, params, options) => { + expect(params.get('file') instanceof File).toBeTruthy(); + expect(method).toEqual('POST'); + expect(url).toEqual('http://localhost:9876/iserver/services/data-world/rest/data/datasources/World/datasets/Countries/features/1/attachments'); + expect(params).not.toBeNull(); + expect(options).not.toBeNull(); + return Promise.resolve( + new Response(`{"size":56,"name":"1.txt","id":-1403040659,"contentType":"text/plain"}`) + ) + }) + myService.editFeatureAttachments(params).then(res => { + let serviceResult = res; + expect(serviceResult.result.succeed).toBeTruthy(); + expect(serviceResult.result.name).toBe('1.txt'); + expect(serviceResult.result.contentType).toBe('text/plain'); + expect(serviceResult.result.size).toBe(56); + done(); + }); + }) +}); diff --git a/test/leaflet/services/GetFeatureAttachmentsSpec.js b/test/leaflet/services/GetFeatureAttachmentsSpec.js new file mode 100644 index 000000000..458e00ee7 --- /dev/null +++ b/test/leaflet/services/GetFeatureAttachmentsSpec.js @@ -0,0 +1,47 @@ +import { FeatureService } from '../../../src/leaflet/services/FeatureService'; +import { AttachmentsParameters } from '../../../src/common/iServer/AttachmentsParameters'; +import { FetchRequest } from '../../../src/common/util/FetchRequest'; + +var url = GlobeParameter.dataServiceURL; +describe('leaflet_GetFeatureAttachments', () => { + var originalTimeout; + beforeEach(() => { + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000; + }); + afterEach(() => { + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + }); + + it('incomplete parameters', done => { + let params = new AttachmentsParameters({ + dataSourceName: "World" + }); + var getFeatureAttachmentsService = new FeatureService(url, {}); + spyOn(FetchRequest, 'commit'); + getFeatureAttachmentsService.getFeatureAttachments(params); + expect(FetchRequest.commit).not.toHaveBeenCalled(); + done(); + }); + it('complete parameters', done => { + let params = new AttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + featureId: 1, + }); + let resInfo = [{ "size": 56, "name": "1.txt", "id": 1966180689, "contentType": "text/plain" }, { "size": 34991, "name": "test.png", "id": 1590279732, "contentType": "image/png" }]; + let myService = new FeatureService(url) + spyOn(FetchRequest, 'commit').and.callFake((method, url, params, options) => { + expect(method).toEqual('GET'); + expect(params).toBeUndefined(); + expect(options).not.toBeNull(); + expect(url).toEqual('http://localhost:9876/iserver/services/data-world/rest/data/datasources/World/datasets/Countries/features/1/attachments'); + return Promise.resolve(new Response(JSON.stringify(resInfo))); + }) + myService.getFeatureAttachments(params).then(res => { + let serviceResult = res; + expect(serviceResult.result.length).toBe(2); + done(); + }); + }) +}); diff --git a/test/mapboxgl/services/EditFeatureAttachmentsSpec.js b/test/mapboxgl/services/EditFeatureAttachmentsSpec.js new file mode 100644 index 000000000..2b94ad35b --- /dev/null +++ b/test/mapboxgl/services/EditFeatureAttachmentsSpec.js @@ -0,0 +1,55 @@ +import { FeatureService } from '../../../src/mapboxgl/services/FeatureService'; +import { EditAttachmentsParameters } from '../../../src/common/iServer/EditAttachmentsParameters'; +import { FetchRequest } from '../../../src/common/util/FetchRequest'; + +var url = GlobeParameter.dataServiceURL; +describe('mapboxgl_GetFeatureAttachments', () => { + var originalTimeout; + beforeEach(() => { + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000; + }); + afterEach(() => { + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + }); + + it('incomplete parameters', done => { + let params = new EditAttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + }); + var editFeatureAttachmentsService = new FeatureService(url, {}); + spyOn(FetchRequest, 'commit'); + editFeatureAttachmentsService.editFeatureAttachments(params); + expect(FetchRequest.commit).not.toHaveBeenCalled(); + done(); + }); + it('complete parameters and add a file', done => { + let file = new File(['file1 contents'], 'file1.txt', { type: 'text/plain' }); + let params = new EditAttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + featureId: 1, + file:file + }); + let myService = new FeatureService(url) + spyOn(FetchRequest, 'commit').and.callFake((method, url, params, options) => { + expect(params.get('file') instanceof File).toBeTruthy(); + expect(method).toEqual('POST'); + expect(url).toEqual('http://localhost:9876/iserver/services/data-world/rest/data/datasources/World/datasets/Countries/features/1/attachments'); + expect(params).not.toBeNull(); + expect(options).not.toBeNull(); + return Promise.resolve( + new Response(`{"size":56,"name":"1.txt","id":-1403040659,"contentType":"text/plain"}`) + ) + }) + myService.editFeatureAttachments(params).then(res => { + let serviceResult = res; + expect(serviceResult.result.succeed).toBeTruthy(); + expect(serviceResult.result.name).toBe('1.txt'); + expect(serviceResult.result.contentType).toBe('text/plain'); + expect(serviceResult.result.size).toBe(56); + done(); + }); + }) +}); diff --git a/test/mapboxgl/services/GetFeatureAttachmentsSpec.js b/test/mapboxgl/services/GetFeatureAttachmentsSpec.js new file mode 100644 index 000000000..010b71333 --- /dev/null +++ b/test/mapboxgl/services/GetFeatureAttachmentsSpec.js @@ -0,0 +1,47 @@ +import { FeatureService } from '../../../src/mapboxgl/services/FeatureService'; +import { AttachmentsParameters } from '../../../src/common/iServer/AttachmentsParameters'; +import { FetchRequest } from '../../../src/common/util/FetchRequest'; + +var url = GlobeParameter.dataServiceURL; +describe('mapboxgl_GetFeatureAttachments', () => { + var originalTimeout; + beforeEach(() => { + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000; + }); + afterEach(() => { + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + }); + + it('incomplete parameters', done => { + let params = new AttachmentsParameters({ + dataSourceName: "World" + }); + var getFeatureAttachmentsService = new FeatureService(url, {}); + spyOn(FetchRequest, 'commit'); + getFeatureAttachmentsService.getFeatureAttachments(params); + expect(FetchRequest.commit).not.toHaveBeenCalled(); + done(); + }); + it('complete parameters', done => { + let params = new AttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + featureId: 1, + }); + let resInfo = [{ "size": 56, "name": "1.txt", "id": 1966180689, "contentType": "text/plain" }, { "size": 34991, "name": "test.png", "id": 1590279732, "contentType": "image/png" }]; + let myService = new FeatureService(url) + spyOn(FetchRequest, 'commit').and.callFake((method, url, params, options) => { + expect(method).toEqual('GET'); + expect(params).toBeUndefined(); + expect(options).not.toBeNull(); + expect(url).toEqual('http://localhost:9876/iserver/services/data-world/rest/data/datasources/World/datasets/Countries/features/1/attachments'); + return Promise.resolve(new Response(JSON.stringify(resInfo))); + }) + myService.getFeatureAttachments(params).then(res => { + let serviceResult = res; + expect(serviceResult.result.length).toBe(2); + done(); + }); + }) +}); diff --git a/test/maplibregl/services/EditFeatureAttachmentsSpec.js b/test/maplibregl/services/EditFeatureAttachmentsSpec.js new file mode 100644 index 000000000..789c16c35 --- /dev/null +++ b/test/maplibregl/services/EditFeatureAttachmentsSpec.js @@ -0,0 +1,55 @@ +import { FeatureService } from '../../../src/maplibregl/services/FeatureService'; +import { EditAttachmentsParameters } from '../../../src/common/iServer/EditAttachmentsParameters'; +import { FetchRequest } from '../../../src/common/util/FetchRequest'; + +var url = GlobeParameter.dataServiceURL; +describe('maplibregl_GetFeatureAttachments', () => { + var originalTimeout; + beforeEach(() => { + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000; + }); + afterEach(() => { + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + }); + + it('incomplete parameters', done => { + let params = new EditAttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + }); + var editFeatureAttachmentsService = new FeatureService(url, {}); + spyOn(FetchRequest, 'commit'); + editFeatureAttachmentsService.editFeatureAttachments(params); + expect(FetchRequest.commit).not.toHaveBeenCalled(); + done(); + }); + it('complete parameters and add a file', done => { + let file = new File(['file1 contents'], 'file1.txt', { type: 'text/plain' }); + let params = new EditAttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + featureId: 1, + file:file + }); + let myService = new FeatureService(url) + spyOn(FetchRequest, 'commit').and.callFake((method, url, params, options) => { + expect(params.get('file') instanceof File).toBeTruthy(); + expect(method).toEqual('POST'); + expect(url).toEqual('http://localhost:9876/iserver/services/data-world/rest/data/datasources/World/datasets/Countries/features/1/attachments'); + expect(params).not.toBeNull(); + expect(options).not.toBeNull(); + return Promise.resolve( + new Response(`{"size":56,"name":"1.txt","id":-1403040659,"contentType":"text/plain"}`) + ) + }) + myService.editFeatureAttachments(params).then(res => { + let serviceResult = res; + expect(serviceResult.result.succeed).toBeTruthy(); + expect(serviceResult.result.name).toBe('1.txt'); + expect(serviceResult.result.contentType).toBe('text/plain'); + expect(serviceResult.result.size).toBe(56); + done(); + }); + }) +}); diff --git a/test/maplibregl/services/GetFeatureAttachmentsSpec.js b/test/maplibregl/services/GetFeatureAttachmentsSpec.js new file mode 100644 index 000000000..2a7601490 --- /dev/null +++ b/test/maplibregl/services/GetFeatureAttachmentsSpec.js @@ -0,0 +1,47 @@ +import { FeatureService } from '../../../src/maplibregl/services/FeatureService'; +import { AttachmentsParameters } from '../../../src/common/iServer/AttachmentsParameters'; +import { FetchRequest } from '../../../src/common/util/FetchRequest'; + +var url = GlobeParameter.dataServiceURL; +describe('maplibregl_GetFeatureAttachments', () => { + var originalTimeout; + beforeEach(() => { + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000; + }); + afterEach(() => { + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + }); + + it('incomplete parameters', done => { + let params = new AttachmentsParameters({ + dataSourceName: "World" + }); + var getFeatureAttachmentsService = new FeatureService(url, {}); + spyOn(FetchRequest, 'commit'); + getFeatureAttachmentsService.getFeatureAttachments(params); + expect(FetchRequest.commit).not.toHaveBeenCalled(); + done(); + }); + it('complete parameters', done => { + let params = new AttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + featureId: 1, + }); + let resInfo = [{ "size": 56, "name": "1.txt", "id": 1966180689, "contentType": "text/plain" }, { "size": 34991, "name": "test.png", "id": 1590279732, "contentType": "image/png" }]; + let myService = new FeatureService(url) + spyOn(FetchRequest, 'commit').and.callFake((method, url, params, options) => { + expect(method).toEqual('GET'); + expect(params).toBeUndefined(); + expect(options).not.toBeNull(); + expect(url).toEqual('http://localhost:9876/iserver/services/data-world/rest/data/datasources/World/datasets/Countries/features/1/attachments'); + return Promise.resolve(new Response(JSON.stringify(resInfo))); + }) + myService.getFeatureAttachments(params).then(res => { + let serviceResult = res; + expect(serviceResult.result.length).toBe(2); + done(); + }); + }) +}); diff --git a/test/openlayers/services/EditFeatureAttachmentsSpec.js b/test/openlayers/services/EditFeatureAttachmentsSpec.js new file mode 100644 index 000000000..766f821d0 --- /dev/null +++ b/test/openlayers/services/EditFeatureAttachmentsSpec.js @@ -0,0 +1,55 @@ +import { FeatureService } from '../../../src/openlayers/services/FeatureService'; +import { EditAttachmentsParameters } from '../../../src/common/iServer/EditAttachmentsParameters'; +import { FetchRequest } from '../../../src/common/util/FetchRequest'; + +var url = GlobeParameter.dataServiceURL; +describe('openlayers_GetFeatureAttachments', () => { + var originalTimeout; + beforeEach(() => { + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000; + }); + afterEach(() => { + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + }); + + it('incomplete parameters', done => { + let params = new EditAttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + }); + var editFeatureAttachmentsService = new FeatureService(url, {}); + spyOn(FetchRequest, 'commit'); + editFeatureAttachmentsService.editFeatureAttachments(params); + expect(FetchRequest.commit).not.toHaveBeenCalled(); + done(); + }); + it('complete parameters and add a file', done => { + let file = new File(['file1 contents'], 'file1.txt', { type: 'text/plain' }); + let params = new EditAttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + featureId: 1, + file:file + }); + let myService = new FeatureService(url) + spyOn(FetchRequest, 'commit').and.callFake((method, url, params, options) => { + expect(params.get('file') instanceof File).toBeTruthy(); + expect(method).toEqual('POST'); + expect(url).toEqual('http://localhost:9876/iserver/services/data-world/rest/data/datasources/World/datasets/Countries/features/1/attachments'); + expect(params).not.toBeNull(); + expect(options).not.toBeNull(); + return Promise.resolve( + new Response(`{"size":56,"name":"1.txt","id":-1403040659,"contentType":"text/plain"}`) + ) + }) + myService.editFeatureAttachments(params).then(res => { + let serviceResult = res; + expect(serviceResult.result.succeed).toBeTruthy(); + expect(serviceResult.result.name).toBe('1.txt'); + expect(serviceResult.result.contentType).toBe('text/plain'); + expect(serviceResult.result.size).toBe(56); + done(); + }); + }) +}); diff --git a/test/openlayers/services/GetFeatureAttachmentsSpec.js b/test/openlayers/services/GetFeatureAttachmentsSpec.js new file mode 100644 index 000000000..7aaf9f658 --- /dev/null +++ b/test/openlayers/services/GetFeatureAttachmentsSpec.js @@ -0,0 +1,47 @@ +import { FeatureService } from '../../../src/openlayers/services/FeatureService'; +import { AttachmentsParameters } from '../../../src/common/iServer/AttachmentsParameters'; +import { FetchRequest } from '../../../src/common/util/FetchRequest'; + +var url = GlobeParameter.dataServiceURL; +describe('openlayers_GetFeatureAttachments', () => { + var originalTimeout; + beforeEach(() => { + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000; + }); + afterEach(() => { + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + }); + + it('incomplete parameters', done => { + let params = new AttachmentsParameters({ + dataSourceName: "World" + }); + var getFeatureAttachmentsService = new FeatureService(url, {}); + spyOn(FetchRequest, 'commit'); + getFeatureAttachmentsService.getFeatureAttachments(params); + expect(FetchRequest.commit).not.toHaveBeenCalled(); + done(); + }); + it('complete parameters', done => { + let params = new AttachmentsParameters({ + dataSourceName: "World", + dataSetName: "Countries", + featureId: 1, + }); + let resInfo = [{ "size": 56, "name": "1.txt", "id": 1966180689, "contentType": "text/plain" }, { "size": 34991, "name": "test.png", "id": 1590279732, "contentType": "image/png" }]; + let myService = new FeatureService(url) + spyOn(FetchRequest, 'commit').and.callFake((method, url, params, options) => { + expect(method).toEqual('GET'); + expect(params).toBeUndefined(); + expect(options).not.toBeNull(); + expect(url).toEqual('http://localhost:9876/iserver/services/data-world/rest/data/datasources/World/datasets/Countries/features/1/attachments'); + return Promise.resolve(new Response(JSON.stringify(resInfo))); + }) + myService.getFeatureAttachments(params).then(res => { + let serviceResult = res; + expect(serviceResult.result.length).toBe(2); + done(); + }); + }) +}); diff --git a/test/test-main-common.js b/test/test-main-common.js index f0e85fe15..3495f5527 100644 --- a/test/test-main-common.js +++ b/test/test-main-common.js @@ -114,7 +114,8 @@ import './common/iServer/ImageRenderingRuleSpec'; import './common/iServer/SortbySpec'; import './common/iServer/ImageStretchOptionSpec'; import './common/iServer/CompatibleSpec.js'; - +import './common/iServer/AttachmentsParametersSpec.js'; +import './common/iServer/EditAttachmentsParametersSpec.js'; /**common -- control**/ import './common/control/TimeControlBaseSpec.js'; import './common/control/TimeFlowControlSpec.js'; diff --git a/test/test-main-leaflet.js b/test/test-main-leaflet.js index f0313d039..982e70406 100644 --- a/test/test-main-leaflet.js +++ b/test/test-main-leaflet.js @@ -86,6 +86,8 @@ import './leaflet/services/DatasourceServiceSpec.js'; import './leaflet/services/ImageServiceSpec'; import './leaflet/services/ImageCollectionServiceSpec'; import './leaflet/services/ChartServiceSpec'; +import './leaflet/services/GetFeatureAttachmentsSpec'; +import './leaflet/services/EditFeatureAttachmentsSpec'; /* component */ import './leaflet/components/openfile/OpenFileViewSpec.js'; import './leaflet/components/dataservicequery/DataServiceQueryViewSpec.js'; diff --git a/test/test-main-mapboxgl.js b/test/test-main-mapboxgl.js index 1033b2b8d..74a8f3302 100644 --- a/test/test-main-mapboxgl.js +++ b/test/test-main-mapboxgl.js @@ -71,7 +71,8 @@ import './mapboxgl/services/DatasourceServiceSpec.js'; import './mapboxgl/services/ImageServiceSpec'; import './mapboxgl/services/ImageCollectionServiceSpec'; import './mapboxgl/services/ChartServiceSpec'; - +import './mapboxgl/services/GetFeatureAttachmentsSpec'; +import './mapboxgl/services/EditFeatureAttachmentsSpec'; /*mapboxgl -- mapping*/ import './mapboxgl/mapping/WebMapSpec.js'; import './mapboxgl/mapping/InitMapSpec.js'; diff --git a/test/test-main-maplibregl.js b/test/test-main-maplibregl.js index 744997227..98cabe90f 100644 --- a/test/test-main-maplibregl.js +++ b/test/test-main-maplibregl.js @@ -46,6 +46,8 @@ import './maplibregl/services/KnowledgeGraphServiceSpec.js'; import './maplibregl/services/AreaSolarRadiationServiceSpec.js'; import './maplibregl/services/NetworkAnalyst3DServiceSpec.js'; import './maplibregl/services/ChartServiceSpec.js'; +import './mapboxgl/services/GetFeatureAttachmentsSpec'; +import './mapboxgl/services/EditFeatureAttachmentsSpec'; // overlay import './maplibregl/overlay/GraphMapSpec'; import './maplibregl/overlay/HeatMapLayerSpec.js'; diff --git a/test/test-main-openlayers.js b/test/test-main-openlayers.js index bbaa2cb9e..9f4d9de1a 100644 --- a/test/test-main-openlayers.js +++ b/test/test-main-openlayers.js @@ -82,4 +82,5 @@ import './openlayers/services/ImageServiceSpec'; import './openlayers/services/ImageCollectionServiceSpec'; import './openlayers/services/KnowledgeGraphServiceSpec.js'; import './openlayers/services/ChartServiceSpec.js'; - +import './mapboxgl/services/GetFeatureAttachmentsSpec'; +import './mapboxgl/services/EditFeatureAttachmentsSpec';