diff --git a/packages/components/cascader-panel/__tests__/cascader-panel.test.tsx b/packages/components/cascader-panel/__tests__/cascader-panel.test.tsx index 6f957a7e45..858d3ae9a5 100644 --- a/packages/components/cascader-panel/__tests__/cascader-panel.test.tsx +++ b/packages/components/cascader-panel/__tests__/cascader-panel.test.tsx @@ -124,6 +124,29 @@ const lazyLoad: LazyLoad = (node, resolve) => { }, 1000) } +describe('avoid other test case affecting this test case', () => { + test('check strictly in single mode with first option', async () => { + // #21311 + const value = ref([]) + const props = { + checkStrictly: true, + } + const wrapper = mount(() => ( + + )) + + const zjRadio = wrapper.findAll(RADIO)[0] + expect(zjRadio.exists()).toBe(true) + + await zjRadio.find('input').trigger('click') + expect(value.value).toEqual(['beijing']) + }) +}) + describe('CascaderPanel.vue', () => { beforeEach(() => { id = 0 @@ -430,27 +453,6 @@ describe('CascaderPanel.vue', () => { expect(value.value).toEqual(['zhejiang']) }) - test('check strictly in single mode with first option', async () => { - // #21311 - const value = ref([]) - const props = { - checkStrictly: true, - } - const wrapper = mount(() => ( - - )) - - const zjRadio = wrapper.findAll(RADIO)[0] - expect(zjRadio.exists()).toBe(true) - - await zjRadio.find('input').trigger('click') - expect(value.value).toEqual(['beijing']) - }) - test('check strictly in single mode with disabled options', async () => { const props = { checkStrictly: true,