Skip to content
Snippets Groups Projects
Commit e024a3cf authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

chore: fix type errors

parent 4a710fc8
No related branches found
No related tags found
1 merge request!9702.6 Release
......@@ -46,7 +46,6 @@ const store = createMockEcolyoStore({
analysis: mockAnalysisState,
})
const allFluids = [FluidType.ELECTRICITY, FluidType.GAS, FluidType.MULTIFLUID]
const performanceIndicator = {
compareValue: 160.42797399999998,
percentageVariation: 0.026592126632478563,
......@@ -77,7 +76,6 @@ describe('AnalysisConsumption component', () => {
<ProfileComparator
aggregatedPerformanceIndicator={performanceIndicator}
performanceIndicators={performanceIndicators}
fluidsWithData={allFluids}
/>
</Provider>
)
......@@ -97,7 +95,6 @@ describe('AnalysisConsumption component', () => {
<ProfileComparator
aggregatedPerformanceIndicator={mockAggregatedPerformanceIndicator}
performanceIndicators={performanceIndicators}
fluidsWithData={allFluids}
/>
</Provider>
)
......@@ -116,7 +113,6 @@ describe('AnalysisConsumption component', () => {
<ProfileComparator
aggregatedPerformanceIndicator={mockAggregatedPerformanceIndicator}
performanceIndicators={performanceIndicators}
fluidsWithData={allFluids}
/>
</Provider>
)
......@@ -131,7 +127,6 @@ describe('AnalysisConsumption component', () => {
<ProfileComparator
aggregatedPerformanceIndicator={performanceIndicator}
performanceIndicators={performanceIndicators}
fluidsWithData={allFluids}
/>
</Provider>
)
......@@ -161,7 +156,6 @@ describe('AnalysisConsumption component', () => {
<ProfileComparator
aggregatedPerformanceIndicator={performanceIndicator}
performanceIndicators={performanceIndicators}
fluidsWithData={allFluids}
/>
</Provider>
)
......@@ -188,7 +182,6 @@ describe('AnalysisConsumption component', () => {
<ProfileComparator
aggregatedPerformanceIndicator={performanceIndicator}
performanceIndicators={performanceIndicators}
fluidsWithData={allFluids}
/>
</Provider>
)
......@@ -207,7 +200,6 @@ describe('AnalysisConsumption component', () => {
<ProfileComparator
aggregatedPerformanceIndicator={performanceIndicator}
performanceIndicators={performanceIndicators}
fluidsWithData={allFluids}
/>
</Provider>
)
......
......@@ -5,17 +5,23 @@ import StyledCard from './StyledCard'
describe('StyledCard component test', () => {
it('should render correctly Electricity StyledCard', () => {
const wrapper = mount(<StyledCard fluidType={FluidType.ELECTRICITY} />)
const wrapper = mount(
<StyledCard fluidType={FluidType.ELECTRICITY}>children</StyledCard>
)
expect(wrapper.getElement()).toMatchSnapshot()
})
it('should render correctly Water StyledCard', () => {
const wrapper = mount(<StyledCard fluidType={FluidType.WATER} />)
const wrapper = mount(
<StyledCard fluidType={FluidType.WATER}>children</StyledCard>
)
expect(wrapper.getElement()).toMatchSnapshot()
})
it('should render correctly Gas StyledCard', () => {
const wrapper = mount(<StyledCard fluidType={FluidType.GAS} />)
const wrapper = mount(
<StyledCard fluidType={FluidType.GAS}>children</StyledCard>
)
expect(wrapper.getElement()).toMatchSnapshot()
})
})
......@@ -3,17 +3,23 @@
exports[`StyledCard component test should render correctly Electricity StyledCard 1`] = `
<StyledCard
fluidType={0}
/>
>
children
</StyledCard>
`;
exports[`StyledCard component test should render correctly Gas StyledCard 1`] = `
<StyledCard
fluidType={2}
/>
>
children
</StyledCard>
`;
exports[`StyledCard component test should render correctly Water StyledCard 1`] = `
<StyledCard
fluidType={1}
/>
>
children
</StyledCard>
`;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment