Skip to content
Snippets Groups Projects
Commit cdd34b7d authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

fix test

parent 4118d749
No related branches found
No related tags found
1 merge request!538Feat/us695 rework conso min elec analysis
...@@ -10,7 +10,7 @@ import { ...@@ -10,7 +10,7 @@ import {
mockEnedisMonthlyAnalysisArray, mockEnedisMonthlyAnalysisArray,
} from '../../../tests/__mocks__/enedisMonthlyAnalysisData.mock' } from '../../../tests/__mocks__/enedisMonthlyAnalysisData.mock'
import { PerformanceIndicator } from 'models' import { PerformanceIndicator } from 'models'
import { allFluidPrices } from '../../../tests/__mocks__/fluidPrice.mock' import { allLastFluidPrices } from '../../../tests/__mocks__/fluidPrice.mock'
jest.mock('cozy-ui/transpiled/react/I18n', () => { jest.mock('cozy-ui/transpiled/react/I18n', () => {
return { return {
...@@ -73,7 +73,7 @@ describe('ElecHalfHourMonthlyAnalysis component', () => { ...@@ -73,7 +73,7 @@ describe('ElecHalfHourMonthlyAnalysis component', () => {
it('should be rendered correctly when isHalfHourActivated is false', async () => { it('should be rendered correctly when isHalfHourActivated is false', async () => {
mockCheckDoctypeEntries.mockResolvedValueOnce(false) mockCheckDoctypeEntries.mockResolvedValueOnce(false)
mockGetPrices.mockResolvedValue(allFluidPrices[0]) mockGetPrices.mockResolvedValue(allLastFluidPrices[0])
const wrapper = mount( const wrapper = mount(
<ElecHalfHourMonthlyAnalysis <ElecHalfHourMonthlyAnalysis
analysisDate={DateTime.fromISO('2021-07-01T00:00:00.000Z', { analysisDate={DateTime.fromISO('2021-07-01T00:00:00.000Z', {
...@@ -94,7 +94,7 @@ describe('ElecHalfHourMonthlyAnalysis component', () => { ...@@ -94,7 +94,7 @@ describe('ElecHalfHourMonthlyAnalysis component', () => {
mockAggregateValuesToDataLoad.mockResolvedValueOnce( mockAggregateValuesToDataLoad.mockResolvedValueOnce(
mockDataLoadEnedisAnalysis mockDataLoadEnedisAnalysis
) )
mockGetPrices.mockResolvedValue(allFluidPrices[0]) mockGetPrices.mockResolvedValue(allLastFluidPrices[0])
const wrapper = mount( const wrapper = mount(
<ElecHalfHourMonthlyAnalysis <ElecHalfHourMonthlyAnalysis
...@@ -116,7 +116,7 @@ describe('ElecHalfHourMonthlyAnalysis component', () => { ...@@ -116,7 +116,7 @@ describe('ElecHalfHourMonthlyAnalysis component', () => {
mockAggregateValuesToDataLoad.mockResolvedValueOnce( mockAggregateValuesToDataLoad.mockResolvedValueOnce(
mockDataLoadEnedisAnalysis mockDataLoadEnedisAnalysis
) )
mockGetPrices.mockResolvedValue(allFluidPrices[0]) mockGetPrices.mockResolvedValue(allLastFluidPrices[0])
const wrapper = mount( const wrapper = mount(
<ElecHalfHourMonthlyAnalysis <ElecHalfHourMonthlyAnalysis
analysisDate={DateTime.fromISO('2021-07-01T00:00:00.000Z', { analysisDate={DateTime.fromISO('2021-07-01T00:00:00.000Z', {
...@@ -142,7 +142,7 @@ describe('ElecHalfHourMonthlyAnalysis component', () => { ...@@ -142,7 +142,7 @@ describe('ElecHalfHourMonthlyAnalysis component', () => {
mockAggregateValuesToDataLoad.mockResolvedValueOnce( mockAggregateValuesToDataLoad.mockResolvedValueOnce(
mockDataLoadEnedisAnalysis mockDataLoadEnedisAnalysis
) )
mockGetPrices.mockResolvedValue(allFluidPrices[0]) mockGetPrices.mockResolvedValue(allLastFluidPrices[0])
const wrapper = mount( const wrapper = mount(
<ElecHalfHourMonthlyAnalysis <ElecHalfHourMonthlyAnalysis
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment