From de3dfa604ba59762cd3ee852672c51fb124271d6 Mon Sep 17 00:00:00 2001 From: Yulia Belyakova Date: Tue, 28 Feb 2023 16:41:19 +0100 Subject: [PATCH] Update admin regions chart level tests in accordance with new fallback approach --- .../impact/impact-chart/chart-origins-levels.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/test/e2e/impact/impact-chart/chart-origins-levels.spec.ts b/api/test/e2e/impact/impact-chart/chart-origins-levels.spec.ts index 8b68c41f31..a93c7292d6 100644 --- a/api/test/e2e/impact/impact-chart/chart-origins-levels.spec.ts +++ b/api/test/e2e/impact/impact-chart/chart-origins-levels.spec.ts @@ -176,7 +176,7 @@ describe('Impact Chart (Ranking) Test Suite (e2e) with requested levels for Admi test( 'When I query a Impact Chart grouped by region ' + 'And send no depth param, but filter by origins of level 0 and 1 ' + - 'Then I should get response structure starting with regions of level 1 (provinces)', + 'Then I should get response structure starting with regions of level 2 (going one level down from the lowest received)', async () => { const response = await request(testApplication.getHttpServer()) .get('/api/v1/impact/ranking') @@ -196,12 +196,12 @@ describe('Impact Chart (Ranking) Test Suite (e2e) with requested levels for Admi }) .expect(HttpStatus.OK); - expect(response.body.impactTable[0].rows.length).toBe(3); - expect(response.body.impactTable[0].rows[0].name).toBe('Province 3'); - expect(response.body.impactTable[0].rows[0].values[0].value).toBe(3000); + expect(response.body.impactTable[0].rows.length).toBe(5); + expect(response.body.impactTable[0].rows[0].name).toBe('Municipality 1'); + expect(response.body.impactTable[0].rows[0].values[0].value).toBe(1000); expect( response.body.impactTable[0].others.aggregatedValues[0].value, - ).toBe(0); + ).toBe(2000); }, ); });