mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-30 02:08:12 +08:00
test: divider test update
This commit is contained in:
parent
77856770d3
commit
7ede28cbe5
@ -10,16 +10,16 @@ describe('Divider.vue', () => {
|
||||
default: AXIOM,
|
||||
},
|
||||
})
|
||||
expect(wrapper.text()).toEqual(AXIOM)
|
||||
expect(wrapper.text()).toBe(AXIOM)
|
||||
})
|
||||
|
||||
test('direction', () => {
|
||||
const { vm } = mount(Divider, {
|
||||
const wrapper = mount(Divider, {
|
||||
props: {
|
||||
direction: 'vertical',
|
||||
},
|
||||
})
|
||||
expect(vm.$el.classList.contains('el-divider--vertical')).toEqual(true)
|
||||
expect(wrapper.classes()).toContain('el-divider--vertical')
|
||||
})
|
||||
|
||||
test('contentPosition', () => {
|
||||
@ -31,16 +31,15 @@ describe('Divider.vue', () => {
|
||||
contentPosition: 'right',
|
||||
},
|
||||
})
|
||||
const textDiv = wrapper.find('.el-divider__text')
|
||||
expect(textDiv.element.classList.contains('is-right')).toEqual(true)
|
||||
expect(wrapper.find('.el-divider__text').classes()).toContain('is-right')
|
||||
})
|
||||
|
||||
test('customClass', () => {
|
||||
const { vm } = mount(Divider, {
|
||||
const wrapper = mount(Divider, {
|
||||
props: {
|
||||
class: 'customClass',
|
||||
},
|
||||
})
|
||||
expect(vm.$el.classList.contains('customClass')).toEqual(true)
|
||||
expect(wrapper.classes()).toContain('customClass')
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user