mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
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:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user