diff --git a/src/components/Analysis/MaxConsumptionCard/__snapshots__/MaxConsumptionCard.spec.tsx.snap b/src/components/Analysis/MaxConsumptionCard/__snapshots__/MaxConsumptionCard.spec.tsx.snap index 4839bb3492eca9e99483242c111061088c5a73d4..ec5022b014cbc9a13e27779c9960c965c7ca8c5d 100644 --- a/src/components/Analysis/MaxConsumptionCard/__snapshots__/MaxConsumptionCard.spec.tsx.snap +++ b/src/components/Analysis/MaxConsumptionCard/__snapshots__/MaxConsumptionCard.spec.tsx.snap @@ -102,7 +102,7 @@ exports[`MaxConsumptionCard component should be rendered correctly 1`] = ` <div class="dataloadvisualizer-euro text-16-normal electricity" > - 12,04 € + 17,41 € </div> </div> </div> diff --git a/src/components/ConsumptionVisualizer/__snapshots__/DataloadConsumptionVisualizer.spec.tsx.snap b/src/components/ConsumptionVisualizer/__snapshots__/DataloadConsumptionVisualizer.spec.tsx.snap index d6b5dfbc129dd95076aceeb30e40b708302778d1..2f716a5db1472dd38dfcb82880155ee608551aab 100644 --- a/src/components/ConsumptionVisualizer/__snapshots__/DataloadConsumptionVisualizer.spec.tsx.snap +++ b/src/components/ConsumptionVisualizer/__snapshots__/DataloadConsumptionVisualizer.spec.tsx.snap @@ -24,7 +24,7 @@ exports[`Dataload consumption visualizer component should render with single flu <div class="dataloadvisualizer-euro text-16-normal electricity" > - 2,09 € + 3,02 € </div> </div> </div> diff --git a/src/components/ConsumptionVisualizer/__snapshots__/DataloadSectionDetail.spec.tsx.snap b/src/components/ConsumptionVisualizer/__snapshots__/DataloadSectionDetail.spec.tsx.snap index 485dca8a00bef798f0388319bf310f5beb07f114..9605815eaa6bb07caf8ba9dcb728f790813401eb 100644 --- a/src/components/ConsumptionVisualizer/__snapshots__/DataloadSectionDetail.spec.tsx.snap +++ b/src/components/ConsumptionVisualizer/__snapshots__/DataloadSectionDetail.spec.tsx.snap @@ -53,7 +53,7 @@ exports[`DataloadSectionDetail component should render correctly 1`] = ` <div class="dataloadvisualizer-euro text-16-normal electricity" > - 2,09 € + 3,02 € </div> </div> `; diff --git a/src/components/TotalConsumption/TotalConsumption.spec.tsx b/src/components/TotalConsumption/TotalConsumption.spec.tsx index de4e50f332f7ea6b6b7b7886b28f3653b5c203e3..9e5904f57f48af797b5963a849730879eea8759e 100644 --- a/src/components/TotalConsumption/TotalConsumption.spec.tsx +++ b/src/components/TotalConsumption/TotalConsumption.spec.tsx @@ -22,7 +22,7 @@ describe('TotalConsumption component', () => { ) await waitFor(() => null, { container }) expect(container).toMatchSnapshot() - expect(screen.getByText('22,77')).toBeInTheDocument() + expect(screen.getByText('32,92')).toBeInTheDocument() }) it('should format multifluid value', async () => { diff --git a/src/components/TotalConsumption/__snapshots__/TotalConsumption.spec.tsx.snap b/src/components/TotalConsumption/__snapshots__/TotalConsumption.spec.tsx.snap index 307e792394c41eb30c0babdebbfae70d8839bc86..5c794cddd19b660b28e2279fed54debe25fd56d1 100644 --- a/src/components/TotalConsumption/__snapshots__/TotalConsumption.spec.tsx.snap +++ b/src/components/TotalConsumption/__snapshots__/TotalConsumption.spec.tsx.snap @@ -19,7 +19,7 @@ exports[`TotalConsumption component should be rendered correctly and render euro <span class="euro-value" > - 22,77 + 32,92 </span> <span class="euro-symbol" diff --git a/src/services/consumption.service.spec.ts b/src/services/consumption.service.spec.ts index 49815f316f32121d1995426a8ab1e8512b4119b8..a9dd16f3bd4e6a48624a6c2bc242e6cd85394b04 100644 --- a/src/services/consumption.service.spec.ts +++ b/src/services/consumption.service.spec.ts @@ -158,22 +158,22 @@ describe('Consumption service', () => { actualData: [ { date: DateTime.fromISO('2020-08-01T00:00:00.000Z'), - value: 84.44375099999999, + value: 118.07354999999998, state: DataloadState.AGGREGATED_VALID, valueDetail: [ - { value: 50.79059999999999, state: DataloadState.VALID }, - { value: 0.931161, state: DataloadState.VALID }, - { value: 32.72199, state: DataloadState.VALID }, + { value: 73.44203999999999, state: DataloadState.VALID }, + { value: 1.0187309999999998, state: DataloadState.VALID }, + { value: 43.612778999999996, state: DataloadState.VALID }, ], }, { date: DateTime.fromISO('2020-08-02T00:00:00.000Z'), - value: 75.2587935, + value: 105.23067499999999, state: DataloadState.AGGREGATED_VALID, valueDetail: [ - { value: 45.266099999999994, state: DataloadState.VALID }, - { value: 0.8298785, state: DataloadState.VALID }, - { value: 29.162815, state: DataloadState.VALID }, + { value: 65.45374, state: DataloadState.VALID }, + { value: 0.9079234999999999, state: DataloadState.VALID }, + { value: 38.86901149999999, state: DataloadState.VALID }, ], }, { @@ -186,22 +186,22 @@ describe('Consumption service', () => { comparisonData: [ { date: DateTime.fromISO('2020-07-01T00:00:00.000Z'), - value: 66.0246567, + value: 92.31903499999999, state: DataloadState.AGGREGATED_VALID, valueDetail: [ - { value: 39.712019999999995, state: DataloadState.VALID }, - { value: 0.7280537, state: DataloadState.VALID }, - { value: 25.584583, state: DataloadState.VALID }, + { value: 57.422667999999994, state: DataloadState.VALID }, + { value: 0.7965227, state: DataloadState.VALID }, + { value: 34.099844299999994, state: DataloadState.VALID }, ], }, { date: DateTime.fromISO('2020-07-02T00:00:00.000Z'), - value: 69.05641589999999, + value: 96.558195, state: DataloadState.AGGREGATED_VALID, valueDetail: [ - { value: 41.53554, state: DataloadState.VALID }, - { value: 0.7614849, state: DataloadState.VALID }, - { value: 26.759391, state: DataloadState.VALID }, + { value: 60.059436, state: DataloadState.VALID }, + { value: 0.8330979000000001, state: DataloadState.VALID }, + { value: 35.6656611, state: DataloadState.VALID }, ], }, { @@ -227,22 +227,22 @@ describe('Consumption service', () => { actualData: [ { date: DateTime.fromISO('2020-08-01T00:00:00.000Z'), - value: 84.44375099999999, + value: 118.07354999999998, state: DataloadState.AGGREGATED_VALID, valueDetail: [ - { value: 50.79059999999999, state: DataloadState.VALID }, - { value: 0.931161, state: DataloadState.VALID }, - { value: 32.72199, state: DataloadState.VALID }, + { value: 73.44203999999999, state: DataloadState.VALID }, + { value: 1.0187309999999998, state: DataloadState.VALID }, + { value: 43.612778999999996, state: DataloadState.VALID }, ], }, { date: DateTime.fromISO('2020-08-02T00:00:00.000Z'), - value: 75.2587935, + value: 105.23067499999999, state: DataloadState.AGGREGATED_VALID, valueDetail: [ - { value: 45.266099999999994, state: DataloadState.VALID }, - { value: 0.8298785, state: DataloadState.VALID }, - { value: 29.162815, state: DataloadState.VALID }, + { value: 65.45374, state: DataloadState.VALID }, + { value: 0.9079234999999999, state: DataloadState.VALID }, + { value: 38.86901149999999, state: DataloadState.VALID }, ], }, { @@ -305,7 +305,7 @@ describe('Consumption service', () => { mockFetchFluidData.mockResolvedValueOnce(mockFetchDataActual) mockFetchFluidData.mockResolvedValueOnce(mockFetchDataComparison) } - const expectedResult = 84.44375099999999 + const expectedResult = 118.07354999999998 const result = await consumptionDataManager.getMaxLoad({ maxTimePeriod: mockTimePeriod, timeStep: TimeStep.DAY, diff --git a/src/services/performanceIndicator.service.spec.ts b/src/services/performanceIndicator.service.spec.ts index e73c56e12bbff334a54eb2dad48533a9787e833f..ae4b9b6a3353c7d16da670d0d80f150ee76e915c 100644 --- a/src/services/performanceIndicator.service.spec.ts +++ b/src/services/performanceIndicator.service.spec.ts @@ -24,9 +24,9 @@ describe('performanceIndicator service', () => { it('should return the current timePeriod and the comparison timePeriod for all timeStep', () => { let expectedResult: PerformanceIndicator = { - value: 5.7911, - compareValue: 7.84615, - percentageVariation: -0.26191826564620857, + value: 7.88495, + compareValue: 11.03678, + percentageVariation: -0.28557514057542144, } let result = performanceIndicatorService.aggregatePerformanceIndicators( @@ -48,9 +48,9 @@ describe('performanceIndicator service', () => { }, ] expectedResult = { - value: 1.8675999999999997, - compareValue: 5.26785, - percentageVariation: -0.6454720616570329, + value: 2.6556, + compareValue: 7.60035, + percentageVariation: -0.6505950383863901, } result = performanceIndicatorService.aggregatePerformanceIndicators( @@ -77,9 +77,9 @@ describe('performanceIndicator service', () => { }, ] expectedResult = { - compareValue: 7.84615, - percentageVariation: -0.48368308023680406, - value: 4.0511, + compareValue: 11.03678, + percentageVariation: -0.5135401811035466, + value: 5.368949999999999, } result = performanceIndicatorService.aggregatePerformanceIndicators( @@ -106,7 +106,7 @@ describe('performanceIndicator service', () => { }, ] expectedResult = { - value: 9.2711, + value: 12.91695, compareValue: 0, percentageVariation: Infinity, } @@ -125,7 +125,7 @@ describe('performanceIndicator service', () => { }, ] expectedResult = { - value: 5.22, + value: 7.548, compareValue: 0, percentageVariation: Infinity, } @@ -145,7 +145,7 @@ describe('performanceIndicator service', () => { ] expectedResult = { value: 0, - compareValue: 2.61, + compareValue: 3.774, percentageVariation: -1, } result =