Browse Source

pref: update selector for more acurrate

pull/15338/head
zy410419243 6 years ago
parent
commit
5b5008420f
  1. 5
      components/calendar/__tests__/index.test.js

5
components/calendar/__tests__/index.test.js

@ -168,10 +168,7 @@ describe('Calendar', () => {
const wrapper = mount(<Calendar onPanelChange={onPanelChange} value={date} />); const wrapper = mount(<Calendar onPanelChange={onPanelChange} value={date} />);
expect(wrapper).toMatchSnapshot(); expect(wrapper).toMatchSnapshot();
expect(wrapper.state().mode).toBe('month'); expect(wrapper.state().mode).toBe('month');
wrapper wrapper.find('.ant-radio-button-input[value="year"]').simulate('change');
.find('.ant-radio-button-input')
.at(1)
.simulate('change');
expect(wrapper).toMatchSnapshot(); expect(wrapper).toMatchSnapshot();
expect(onPanelChange).toBeCalled(); expect(onPanelChange).toBeCalled();
expect(onPanelChange.mock.calls[0][1]).toEqual('year'); expect(onPanelChange.mock.calls[0][1]).toEqual('year');

Loading…
Cancel
Save