diff --git a/packages/featureserver/src/helpers/feature-layer-metadata.spec.js b/packages/featureserver/src/helpers/feature-layer-metadata.spec.js index 38a8ecc76..d9b4a0e3a 100644 --- a/packages/featureserver/src/helpers/feature-layer-metadata.spec.js +++ b/packages/featureserver/src/helpers/feature-layer-metadata.spec.js @@ -56,7 +56,7 @@ describe('FeatureLayerMetadata', () => { type: 'Feature Layer', displayField: '', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -185,7 +185,7 @@ describe('FeatureLayerMetadata', () => { type: 'Feature Layer', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -353,7 +353,7 @@ describe('FeatureLayerMetadata', () => { type: 'Feature Layer', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -513,7 +513,7 @@ describe('FeatureLayerMetadata', () => { type: 'Feature Layer', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -669,7 +669,7 @@ describe('FeatureLayerMetadata', () => { type: 'Feature Layer', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -831,7 +831,7 @@ describe('FeatureLayerMetadata', () => { type: 'Feature Layer', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -972,7 +972,7 @@ describe('FeatureLayerMetadata', () => { type: 'Feature Layer', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -1139,7 +1139,7 @@ describe('FeatureLayerMetadata', () => { type: 'Feature Layer', displayField: 'myField', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, diff --git a/packages/featureserver/src/helpers/table-layer-metadata.spec.js b/packages/featureserver/src/helpers/table-layer-metadata.spec.js index b806dac27..d88e386d8 100644 --- a/packages/featureserver/src/helpers/table-layer-metadata.spec.js +++ b/packages/featureserver/src/helpers/table-layer-metadata.spec.js @@ -31,7 +31,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: '', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -151,7 +151,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -264,7 +264,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -375,7 +375,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -486,7 +486,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'hellow', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -597,7 +597,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'fluffy', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -708,7 +708,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -819,7 +819,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -930,7 +930,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -1041,7 +1041,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -1155,7 +1155,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -1269,7 +1269,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -1380,7 +1380,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -1491,7 +1491,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -1602,7 +1602,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -1713,7 +1713,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, @@ -1824,7 +1824,7 @@ describe('TableLayerMetadata', () => { type: 'Table', displayField: 'OBJECTID', description: - 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.', + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.', copyrightText: 'Copyright information varies by provider. For more information please contact the source of this data.', defaultVisibility: true, diff --git a/packages/featureserver/src/metadata-defaults.js b/packages/featureserver/src/metadata-defaults.js index 6b6fe7cbf..809b7a80b 100644 --- a/packages/featureserver/src/metadata-defaults.js +++ b/packages/featureserver/src/metadata-defaults.js @@ -3,9 +3,11 @@ const _ = require('lodash'); const CURRENT_VERSION = 11.2; const FULL_VERSION = '11.2.0'; const MAX_RECORD_COUNT = 2000; -const description = +const SERVICE_DESCRIPTION = 'This is a feature service exposed with Koop. For more information go to https://github.com/koopjs/koop.'; -const copyrightText = +const LAYER_DESCRIPTION = + 'This is a feature layer exposed with Koop. For more information go to https://github.com/koopjs/koop.'; +const COPYRIGHT = 'Copyright information varies by provider. For more information please contact the source of this data.'; const SPATIAL_REFERENCE = { wkid: 4326, @@ -24,17 +26,17 @@ const defaultOverridables = { fullVersion: FULL_VERSION, maxRecordCount: MAX_RECORD_COUNT, server: { - serviceDescription: description, - description, - copyrightText, + serviceDescription: SERVICE_DESCRIPTION, + description: SERVICE_DESCRIPTION, + copyrightText: COPYRIGHT, fullExtent: EXTENT, initialExtent: EXTENT, hasStaticData: false, spatialReference: SPATIAL_REFERENCE, }, layer: { - description, - copyrightText, + description: LAYER_DESCRIPTION, + copyrightText: COPYRIGHT, extent: EXTENT, }, }; diff --git a/test/geoservice-client-requests-no-geom.spec.js b/test/geoservice-client-requests-no-geom.spec.js index d6e459271..9129d298a 100644 --- a/test/geoservice-client-requests-no-geom.spec.js +++ b/test/geoservice-client-requests-no-geom.spec.js @@ -1,7 +1,7 @@ const Koop = require('@koopjs/koop-core'); const provider = require('@koopjs/provider-file-geojson'); const request = require('supertest'); -const VERSION = 11.2; +const CURRENT_VERSION = 11.2; const COPYRIGHT_TEXT = 'Copyright information varies by provider. For more information please contact the source of this data.'; @@ -36,7 +36,7 @@ describe('Typical Geoservice Client request sequence: Dataset with no geometry', ); const serverInfo = response.body; expect(serverInfo).toEqual({ - currentVersion: VERSION, + currentVersion: CURRENT_VERSION, maxRecordCount: 2000, serviceDescription: 'GeoJSON from no-geom-w-objectid.geojson', description: 'GeoJSON from no-geom-w-objectid.geojson', @@ -112,7 +112,7 @@ describe('Typical Geoservice Client request sequence: Dataset with no geometry', layers: [], tables: [ { - currentVersion: VERSION, + currentVersion: CURRENT_VERSION, id: 0, name: 'no-geom-w-objectid.geojson', type: 'Table', @@ -278,7 +278,7 @@ describe('Typical Geoservice Client request sequence: Dataset with no geometry', expect(response.status).toBe(200); const info = response.body; expect(info).toEqual({ - currentVersion: VERSION, + currentVersion: CURRENT_VERSION, id: 0, name: 'no-geom-w-objectid.geojson', type: 'Table', diff --git a/test/helpers/client-response-fixtures.js b/test/helpers/client-response-fixtures.js index eef351e75..b4be4c09d 100644 --- a/test/helpers/client-response-fixtures.js +++ b/test/helpers/client-response-fixtures.js @@ -1,10 +1,10 @@ -const VERSION = 11.2; +const CURRENT_VERSION = 11.2; const COPYRIGHT_TEXT = 'Copyright information varies by provider. For more information please contact the source of this data.'; function getServerInfo(id) { return { - currentVersion: VERSION, + currentVersion: CURRENT_VERSION, maxRecordCount: 2000, serviceDescription: `GeoJSON from ${id}.geojson`, description: `GeoJSON from ${id}.geojson`, @@ -70,7 +70,7 @@ function getLayersInfo(filename, idField) { return { layers: [ { - currentVersion: VERSION, + currentVersion: CURRENT_VERSION, id: 0, name: `${filename}.geojson`, type: 'Feature Layer',