Skip to content

Commit

Permalink
removed unnecessary Radar onClick handler story + removed commented l…
Browse files Browse the repository at this point in the history
…ine in Radar.test
  • Loading branch information
Nino3103 committed Jul 5, 2024
1 parent 0c3767a commit 709ff3f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
3 changes: 0 additions & 3 deletions packages/radar/tests/Radar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,10 @@ describe('legend', () => {
describe('interactivity', () => {
it('should support onClick handler', async () => {
const onClick = jest.fn()
// const wrapper = mount(<Radar<TestDatum> {...baseProps} />)
const instance = create(<Radar<TestDatum> {...baseProps} onClick={onClick} />).root

await act(() => {
instance.findAllByType(RadarSlice)[0].findByType('path').props.onClick()
})

expect(onClick).toHaveBeenCalledTimes(1)
const [datum] = onClick.mock.calls[0]
expect(datum).toHaveProperty('A')
Expand Down
11 changes: 0 additions & 11 deletions storybook/stories/radar/Radar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,3 @@ export const WithPatterns: Story = {
export const WithRotation: Story = {
render: args => <Radar {...commonProperties} curve={args.curve} rotation={36} />,
}

export const WithOnClick: Story = {
render: args => (
<Radar
{...commonProperties}
curve={args.curve}
rotation={36}
onClick={datum => console.log('datum', datum)}
/>
),
}

0 comments on commit 709ff3f

Please sign in to comment.