Skip to content

Commit

Permalink
✅ Add test for appereance section
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Apr 5, 2023
1 parent 5ad079d commit 11573f3
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ describe('layer settings', () => {
});

const layerId = 'layer-id';
const props: VisualizationLayerSettingsProps<PieVisualizationState> = {
const props: VisualizationLayerSettingsProps<PieVisualizationState> & {
section: 'data' | 'appereance';
} = {
setState: jest.fn(),
layerId,
state: getState(false),
frame: {} as FramePublicAPI,
panelRef: {} as React.MutableRefObject<HTMLDivElement | null>,
section: 'data',
};

it('toggles multiple metrics', () => {
Expand Down Expand Up @@ -90,5 +93,9 @@ describe('layer settings', () => {
).isEmptyRender()
).toBeTruthy();
});

test('should not render anything for the appereance section', () => {
expect(shallow(<LayerSettings {...props} section="appereance" />).isEmptyRender());
});
});
});

0 comments on commit 11573f3

Please sign in to comment.