Skip to content

Commit de470c0

Browse files
committed
EES-5401 clean up tests & types
1 parent e52b4d2 commit de470c0

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/explore-education-statistics-admin/src/pages/release/datablocks/components/chart/__tests__/ChartBuilderPreview.test.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { ChartRendererProps } from '@common/modules/charts/components/ChartRende
44
import { AxisConfiguration } from '@common/modules/charts/types/chart';
55
import { DataSet } from '@common/modules/charts/types/dataSet';
66
import mapFullTable from '@common/modules/table-tool/utils/mapFullTable';
7-
import { Chart } from '@common/services/types/blocks';
87
import { render, screen } from '@testing-library/react';
98
import { produce } from 'immer';
109

@@ -184,8 +183,7 @@ describe('ChartBuilderPreview', () => {
184183
render(
185184
<ChartBuilderPreview
186185
chart={produce(testMapChartRenderer, draft => {
187-
(draft as Chart & { boundaryLevel?: number }).boundaryLevel =
188-
undefined;
186+
draft.boundaryLevel = undefined;
189187
})}
190188
loading={false}
191189
/>,

src/explore-education-statistics-common/src/modules/charts/components/MapBlock.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default function MapBlock({
120120
width,
121121
height,
122122
axes,
123-
}: Omit<MapBlockProps, 'releaseId' | 'dataBlockParentId' | 'boundaryLevel'>) {
123+
}: MapBlockProps) {
124124
const axisMajor = useMemo<AxisConfiguration>(
125125
() => ({
126126
...axes.major,

src/explore-education-statistics-common/src/modules/find-statistics/components/__tests__/DataBlockTabs.test.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,7 @@ describe('DataBlockTabs', () => {
370370
expect(tableBuilderService.getLocationGeoJson).toBeCalledWith(
371371
'release-1',
372372
'block-1-parent',
373-
testMapConfiguration.type === 'map' &&
374-
testMapConfiguration.boundaryLevel,
373+
1,
375374
);
376375

377376
expect(container.querySelector('.leaflet-container')).toBeInTheDocument();

0 commit comments

Comments
 (0)