Fix tests
This commit is contained in:
parent
888d4e95a3
commit
321568abe6
4 changed files with 12 additions and 18 deletions
|
@ -136,7 +136,7 @@ export default class FeaturePipeline {
|
||||||
// Passthrough to passed function, except that it registers as well
|
// Passthrough to passed function, except that it registers as well
|
||||||
handleFeatureSource(src)
|
handleFeatureSource(src)
|
||||||
src.features.addCallbackAndRunD((fs) => {
|
src.features.addCallbackAndRunD((fs) => {
|
||||||
fs.forEach((ff) => state.allElements.addOrGetElement(ff.feature))
|
fs.forEach((ff) => state.allElements.addOrGetElement(<any>ff.feature))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -34,7 +34,7 @@
|
||||||
"leaflet-simple-map-screenshoter": "^0.4.5",
|
"leaflet-simple-map-screenshoter": "^0.4.5",
|
||||||
"libphonenumber-js": "^1.10.8",
|
"libphonenumber-js": "^1.10.8",
|
||||||
"lz-string": "^1.4.4",
|
"lz-string": "^1.4.4",
|
||||||
"mangrove-reviews-typescript": "^0.0.6",
|
"mangrove-reviews-typescript": "^1.1.0",
|
||||||
"opening_hours": "^3.6.0",
|
"opening_hours": "^3.6.0",
|
||||||
"osm-auth": "^1.0.2",
|
"osm-auth": "^1.0.2",
|
||||||
"osmtogeojson": "^3.0.0-beta.5",
|
"osmtogeojson": "^3.0.0-beta.5",
|
||||||
|
@ -6880,9 +6880,9 @@
|
||||||
"devOptional": true
|
"devOptional": true
|
||||||
},
|
},
|
||||||
"node_modules/mangrove-reviews-typescript": {
|
"node_modules/mangrove-reviews-typescript": {
|
||||||
"version": "0.0.6",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/mangrove-reviews-typescript/-/mangrove-reviews-typescript-0.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/mangrove-reviews-typescript/-/mangrove-reviews-typescript-1.1.0.tgz",
|
||||||
"integrity": "sha512-31wF20PdaKUhxP5lek7YouF50QbNk4U571I86e0lG5U/khP96wbVToZB2P4Anb0OPoQ2alHfpqJPuc491ptw2Q==",
|
"integrity": "sha512-gkN/vKW5uwnEOOyg8W9mxL7e4oCaSbtl/O4zs758t+S6SiIe6hO+l+SnauuXrtaH26agfL48KW4uLxwd2zcxfA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.2.3",
|
"axios": "^1.2.3",
|
||||||
"jose": "^4.11.2",
|
"jose": "^4.11.2",
|
||||||
|
@ -15713,9 +15713,9 @@
|
||||||
"devOptional": true
|
"devOptional": true
|
||||||
},
|
},
|
||||||
"mangrove-reviews-typescript": {
|
"mangrove-reviews-typescript": {
|
||||||
"version": "0.0.6",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/mangrove-reviews-typescript/-/mangrove-reviews-typescript-0.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/mangrove-reviews-typescript/-/mangrove-reviews-typescript-1.1.0.tgz",
|
||||||
"integrity": "sha512-31wF20PdaKUhxP5lek7YouF50QbNk4U571I86e0lG5U/khP96wbVToZB2P4Anb0OPoQ2alHfpqJPuc491ptw2Q==",
|
"integrity": "sha512-gkN/vKW5uwnEOOyg8W9mxL7e4oCaSbtl/O4zs758t+S6SiIe6hO+l+SnauuXrtaH26agfL48KW4uLxwd2zcxfA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"axios": "^1.2.3",
|
"axios": "^1.2.3",
|
||||||
"jose": "^4.11.2",
|
"jose": "^4.11.2",
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
"leaflet-simple-map-screenshoter": "^0.4.5",
|
"leaflet-simple-map-screenshoter": "^0.4.5",
|
||||||
"libphonenumber-js": "^1.10.8",
|
"libphonenumber-js": "^1.10.8",
|
||||||
"lz-string": "^1.4.4",
|
"lz-string": "^1.4.4",
|
||||||
"mangrove-reviews-typescript": "^0.0.6",
|
"mangrove-reviews-typescript": "^1.1.0",
|
||||||
"opening_hours": "^3.6.0",
|
"opening_hours": "^3.6.0",
|
||||||
"osm-auth": "^1.0.2",
|
"osm-auth": "^1.0.2",
|
||||||
"osmtogeojson": "^3.0.0-beta.5",
|
"osmtogeojson": "^3.0.0-beta.5",
|
||||||
|
|
|
@ -9,6 +9,8 @@ import { UIEventSource } from "../../../Logic/UIEventSource"
|
||||||
import Loc from "../../../Models/Loc"
|
import Loc from "../../../Models/Loc"
|
||||||
import SelectedFeatureHandler from "../../../Logic/Actors/SelectedFeatureHandler"
|
import SelectedFeatureHandler from "../../../Logic/Actors/SelectedFeatureHandler"
|
||||||
import { ElementStorage } from "../../../Logic/ElementStorage"
|
import { ElementStorage } from "../../../Logic/ElementStorage"
|
||||||
|
import { OsmTags } from "../../../Models/OsmFeature"
|
||||||
|
import { Feature, Geometry } from "geojson"
|
||||||
|
|
||||||
const latestTags = {
|
const latestTags = {
|
||||||
amenity: "public_bookcase",
|
amenity: "public_bookcase",
|
||||||
|
@ -47,7 +49,7 @@ Utils.injectJsonDownloadForTests("https://www.openstreetmap.org/api/0.6/node/556
|
||||||
|
|
||||||
it("should download the latest version", () => {
|
it("should download the latest version", () => {
|
||||||
const state = new UserRelatedState(new LayoutConfig(<any>bookcaseJson, true))
|
const state = new UserRelatedState(new LayoutConfig(<any>bookcaseJson, true))
|
||||||
const feature = {
|
const feature: Feature<Geometry, OsmTags> = {
|
||||||
type: "Feature",
|
type: "Feature",
|
||||||
id: "node/5568693115",
|
id: "node/5568693115",
|
||||||
properties: {
|
properties: {
|
||||||
|
@ -70,14 +72,6 @@ it("should download the latest version", () => {
|
||||||
type: "Point",
|
type: "Point",
|
||||||
coordinates: [3.2154662, 51.2179199],
|
coordinates: [3.2154662, 51.2179199],
|
||||||
},
|
},
|
||||||
bbox: {
|
|
||||||
maxLat: 51.2179199,
|
|
||||||
maxLon: 3.2154662,
|
|
||||||
minLat: 51.2179199,
|
|
||||||
minLon: 3.2154662,
|
|
||||||
},
|
|
||||||
_lon: 3.2154662,
|
|
||||||
_lat: 51.2179199,
|
|
||||||
}
|
}
|
||||||
state.allElements.addOrGetElement(feature)
|
state.allElements.addOrGetElement(feature)
|
||||||
SelectedElementTagsUpdater.installCallback(state)
|
SelectedElementTagsUpdater.installCallback(state)
|
||||||
|
|
Loading…
Reference in a new issue