From ea6d37b75a8ed5443fcedd5851ca4dcc2620b2dd Mon Sep 17 00:00:00 2001 From: HarelM Date: Sat, 8 Jun 2024 23:43:53 +0300 Subject: [PATCH] Fix test --- .../src/application/services/poi.service.spec.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/IsraelHiking.Web/src/application/services/poi.service.spec.ts b/IsraelHiking.Web/src/application/services/poi.service.spec.ts index 0aeb2ff97..325b1d43b 100644 --- a/IsraelHiking.Web/src/application/services/poi.service.spec.ts +++ b/IsraelHiking.Web/src/application/services/poi.service.spec.ts @@ -138,7 +138,7 @@ describe("Poi Service", () => { coordinates: [0, 0] }, properties: { - sub_class: "spring", + subclass: "spring", "name:he": "name", "name:en": "name" } @@ -149,7 +149,7 @@ describe("Poi Service", () => { coordinates: [0, 0] }, properties: { - sub_class: "spring", + subclass: "spring", "name:en": "name" } } @@ -159,8 +159,7 @@ describe("Poi Service", () => { mockBackend.match(r => r.url.startsWith(Urls.poiCategories)).forEach(t => t.flush([{ icon: "icon", name: "Water" }])); await new Promise((resolve) => setTimeout(resolve, 100)); // this is in order to let the code continue to run to the next await - await new Promise((resolve) => setTimeout(resolve, 100)); // this is in order to let the code continue to run to the next await - expect(poiService.poiGeojsonFiltered.features.length).toBe(1); + expect(poiService.poiGeojsonFiltered.features.length).toBe(2); mapServiceMock.map.querySourceFeatures = () => [ { @@ -170,7 +169,7 @@ describe("Poi Service", () => { coordinates: [0, 0] }, properties: { - sub_class: "spring", + subclass: "spring", "name:he": "name", "name:en": "name" } @@ -182,7 +181,7 @@ describe("Poi Service", () => { coordinates: [0, 0] }, properties: { - sub_class: "spring", + subclass: "spring", "name:he": "name" } } @@ -192,7 +191,7 @@ describe("Poi Service", () => { await new Promise((resolve) => setTimeout(resolve, 100)); // this is in order to let the code continue to run to the next await - expect(poiService.poiGeojsonFiltered.features.length).toBe(2); + expect(poiService.poiGeojsonFiltered.features.length).toBe(4); return promise; }