From e2cddd68b59a870d6ccc77b04891aa01d67b3dbf Mon Sep 17 00:00:00 2001 From: vagusX Date: Fri, 22 Apr 2022 22:02:50 +0800 Subject: [PATCH] test: fix test in segmented (#35183) --- components/segmented/__tests__/index.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/segmented/__tests__/index.test.tsx b/components/segmented/__tests__/index.test.tsx index c89659def3..5439cfeafe 100644 --- a/components/segmented/__tests__/index.test.tsx +++ b/components/segmented/__tests__/index.test.tsx @@ -99,7 +99,7 @@ describe('Segmented', () => { .map(el => (el.getDOMNode() as HTMLInputElement).checked), ).toEqual([true, false, false]); expect( - wrapper.find(`.${prefixCls}-item`).at(0).hasClass(`${prefixCls}-item-selected`), + wrapper.find(`label.${prefixCls}-item`).at(0).hasClass(`${prefixCls}-item-selected`), ).toBeTruthy(); wrapper.find(`.${prefixCls}-item-input`).at(2).simulate('change'); @@ -164,7 +164,7 @@ describe('Segmented', () => { ); expect(wrapper.render()).toMatchSnapshot(); expect( - wrapper.find(`.${prefixCls}-item`).at(1).hasClass(`${prefixCls}-item-disabled`), + wrapper.find(`label.${prefixCls}-item`).at(1).hasClass(`${prefixCls}-item-disabled`), ).toBeTruthy(); expect(wrapper.find(`.${prefixCls}-item-input`).at(1).prop('disabled')).toBeTruthy(); @@ -304,7 +304,7 @@ describe('Segmented', () => { .map(el => (el.getDOMNode() as HTMLInputElement).checked), ).toEqual([true, false, false]); expect( - wrapper.find(`.${prefixCls}-item`).at(0).hasClass(`${prefixCls}-item-selected`), + wrapper.find(`label.${prefixCls}-item`).at(0).hasClass(`${prefixCls}-item-selected`), ).toBeTruthy(); wrapper.find(`.${prefixCls}-item-input`).at(2).simulate('change');