test(components): [tag] replace closeTransition with disableTransitions (#17611)

* test(components): [tag] replace closeTransition with disableTransitions

* test(components): [tag] complete type test
This commit is contained in:
chouchouji
2024-07-24 13:45:32 +08:00
committed by GitHub
parent ff5ba6a764
commit bfbd4741a2

View File

@@ -27,6 +27,10 @@ describe('Tag.vue', () => {
const wrapper = mount(() => <Tag type="success" />)
const vm = wrapper.vm
expect(vm.$el.classList.contains('el-tag--success')).toEqual(true)
expect(vm.$el.classList.contains('el-tag--primary')).toEqual(false)
expect(vm.$el.classList.contains('el-tag--danger')).toEqual(false)
expect(vm.$el.classList.contains('el-tag--info')).toEqual(false)
expect(vm.$el.classList.contains('el-tag--warning')).toEqual(false)
})
test('hit', () => {
@@ -45,8 +49,8 @@ describe('Tag.vue', () => {
expect(comp.emitted().close).toBeTruthy()
})
test('closeTransition', () => {
const wrapper = mount(() => <Tag closeTransition={true} />)
test('disableTransitions', () => {
const wrapper = mount(() => <Tag disableTransitions={true} />)
const vm = wrapper.vm
expect(vm.$el.classList.contains('md-fade-center')).toEqual(false)
})