From 5b5008420f20c5a965746e2f4aa036e798708227 Mon Sep 17 00:00:00 2001 From: zy410419243 Date: Tue, 12 Mar 2019 15:06:41 +0800 Subject: [PATCH] pref: update selector for more acurrate --- components/calendar/__tests__/index.test.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/calendar/__tests__/index.test.js b/components/calendar/__tests__/index.test.js index b088761a41..63231df31c 100644 --- a/components/calendar/__tests__/index.test.js +++ b/components/calendar/__tests__/index.test.js @@ -168,10 +168,7 @@ describe('Calendar', () => { const wrapper = mount(); expect(wrapper).toMatchSnapshot(); expect(wrapper.state().mode).toBe('month'); - wrapper - .find('.ant-radio-button-input') - .at(1) - .simulate('change'); + wrapper.find('.ant-radio-button-input[value="year"]').simulate('change'); expect(wrapper).toMatchSnapshot(); expect(onPanelChange).toBeCalled(); expect(onPanelChange.mock.calls[0][1]).toEqual('year');