From db1dbc0f07c3fdda08dbb0be229893be03cdf8ab Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 21 Sep 2023 15:28:40 +0200 Subject: [PATCH] Fix tests, version bump --- package.json | 2 +- src/Logic/Osm/OsmConnection.ts | 2 +- test/Logic/Actors/Actors.spec.ts | 2 +- .../OSM/Actions/ReplaceGeometryAction.spec.ts | 6 +++--- test/Logic/OSM/Actions/SplitAction.spec.ts | 16 ++++++++-------- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 2216e5314..443d54e3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapcomplete", - "version": "0.33.1", + "version": "0.33.2", "repository": "https://github.com/pietervdvn/MapComplete", "description": "A small website to edit OSM easily", "bugs": "https://github.com/pietervdvn/MapComplete/issues", diff --git a/src/Logic/Osm/OsmConnection.ts b/src/Logic/Osm/OsmConnection.ts index 0ee8505d1..e650250a9 100644 --- a/src/Logic/Osm/OsmConnection.ts +++ b/src/Logic/Osm/OsmConnection.ts @@ -179,7 +179,7 @@ export class OsmConnection { /** * The backend host, without path or trailing '/' * - * new OsmConnection().Backend() // => "https://api.openstreetmap.org" + * new OsmConnection().Backend() // => "https://www.openstreetmap.org" */ public Backend(): string { return this._oauth_config.url diff --git a/test/Logic/Actors/Actors.spec.ts b/test/Logic/Actors/Actors.spec.ts index 751964722..ef31ee319 100644 --- a/test/Logic/Actors/Actors.spec.ts +++ b/test/Logic/Actors/Actors.spec.ts @@ -21,7 +21,7 @@ const latestTags = { "public_bookcase:type": "reading_box", } -Utils.injectJsonDownloadForTests("https://api.openstreetmap.org/api/0.6/node/5568693115", { +Utils.injectJsonDownloadForTests("https://www.openstreetmap.org/api/0.6/node/5568693115", { version: "0.6", generator: "CGImap 0.8.5 (1815943 spike-06.openstreetmap.org)", copyright: "OpenStreetMap and contributors", diff --git a/test/Logic/OSM/Actions/ReplaceGeometryAction.spec.ts b/test/Logic/OSM/Actions/ReplaceGeometryAction.spec.ts index bcc6e69d7..94098e525 100644 --- a/test/Logic/OSM/Actions/ReplaceGeometryAction.spec.ts +++ b/test/Logic/OSM/Actions/ReplaceGeometryAction.spec.ts @@ -327,7 +327,7 @@ describe("ReplaceGeometryAction", () => { const wayId = "way/160909312" Utils.injectJsonDownloadForTests( - "https://api.openstreetmap.org/api/0.6/map.json?bbox=3.2166673243045807,51.21467321525788,3.217007964849472,51.21482442824023", + "https://www.openstreetmap.org/api/0.6/map.json?bbox=3.2166673243045807,51.21467321525788,3.217007964849472,51.21482442824023", { version: "0.6", generator: "CGImap 0.8.6 (1549677 spike-06.openstreetmap.org)", @@ -715,7 +715,7 @@ describe("ReplaceGeometryAction", () => { } ) - Utils.injectJsonDownloadForTests("https://api.openstreetmap.org/api/0.6/way/160909312/full", { + Utils.injectJsonDownloadForTests("https://www.openstreetmap.org/api/0.6/way/160909312/full", { version: "0.6", generator: "CGImap 0.8.6 (2407324 spike-06.openstreetmap.org)", copyright: "OpenStreetMap and contributors", @@ -880,7 +880,7 @@ describe("ReplaceGeometryAction", () => { [3.2166673243045807, 51.21467321525788], [3.217007964849472, 51.21482442824023], ]) - const url = `https://api.openstreetmap.org/api/0.6/map.json?bbox=${bbox.minLon},${bbox.minLat},${bbox.maxLon},${bbox.maxLat}` + const url = `https://www.openstreetmap.org/api/0.6/map.json?bbox=${bbox.minLon},${bbox.minLat},${bbox.maxLon},${bbox.maxLat}` const data = await Utils.downloadJson(url) const fullNodeDatabase = new FullNodeDatabaseSource() fullNodeDatabase.handleOsmJson(data, 0, 0, 0) diff --git a/test/Logic/OSM/Actions/SplitAction.spec.ts b/test/Logic/OSM/Actions/SplitAction.spec.ts index aee9a5860..53147d224 100644 --- a/test/Logic/OSM/Actions/SplitAction.spec.ts +++ b/test/Logic/OSM/Actions/SplitAction.spec.ts @@ -9,7 +9,7 @@ describe("SplitAction", () => { { // Setup of download Utils.injectJsonDownloadForTests( - "https://api.openstreetmap.org/api/0.6/way/941079939/full", + "https://www.openstreetmap.org/api/0.6/way/941079939/full", { version: "0.6", generator: "CGImap 0.8.5 (957273 spike-08.openstreetmap.org)", @@ -210,7 +210,7 @@ describe("SplitAction", () => { ) Utils.injectJsonDownloadForTests( - "https://api.openstreetmap.org/api/0.6/way/941079939/relations", + "https://www.openstreetmap.org/api/0.6/way/941079939/relations", { version: "0.6", generator: "CGImap 0.8.5 (2419440 spike-07.openstreetmap.org)", @@ -222,7 +222,7 @@ describe("SplitAction", () => { ) Utils.injectJsonDownloadForTests( - "https://api.openstreetmap.org/api/0.6/way/295132739/full", + "https://www.openstreetmap.org/api/0.6/way/295132739/full", { version: "0.6", generator: "CGImap 0.8.5 (3138407 spike-07.openstreetmap.org)", @@ -409,7 +409,7 @@ describe("SplitAction", () => { } ) Utils.injectJsonDownloadForTests( - "https://api.openstreetmap.org/api/0.6/way/295132739/relations", + "https://www.openstreetmap.org/api/0.6/way/295132739/relations", // Mimick that there are no relations relation is missing { version: "0.6", @@ -422,7 +422,7 @@ describe("SplitAction", () => { ) Utils.injectJsonDownloadForTests( - "https://api.openstreetmap.org/api/0.6/way/61435323/full", + "https://www.openstreetmap.org/api/0.6/way/61435323/full", { version: "0.6", generator: "CGImap 0.8.5 (53092 spike-08.openstreetmap.org)", @@ -488,7 +488,7 @@ describe("SplitAction", () => { } ) Utils.injectJsonDownloadForTests( - "https://api.openstreetmap.org/api/0.6/way/61435323/relations", + "https://www.openstreetmap.org/api/0.6/way/61435323/relations", { version: "0.6", generator: "CGImap 0.8.5 (3622541 spike-06.openstreetmap.org)", @@ -2567,7 +2567,7 @@ describe("SplitAction", () => { } ) Utils.injectJsonDownloadForTests( - "https://api.openstreetmap.org/api/0.6/way/61435332/full", + "https://www.openstreetmap.org/api/0.6/way/61435332/full", { version: "0.6", generator: "CGImap 0.8.5 (3819319 spike-06.openstreetmap.org)", @@ -2620,7 +2620,7 @@ describe("SplitAction", () => { } ) Utils.injectJsonDownloadForTests( - "https://api.openstreetmap.org/api/0.6/way/509668834/full", + "https://www.openstreetmap.org/api/0.6/way/509668834/full", { version: "0.6", generator: "CGImap 0.8.5 (3735280 spike-06.openstreetmap.org)",