mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 09:50:58 +08:00
test(select): add select modelValue prop type test (#1173)
* fix(select): fix select type missing array * fix(select): add select test
This commit is contained in:
parent
cc8f825715
commit
85bad6c169
@ -206,13 +206,16 @@ describe('Select', () => {
|
|||||||
const options = getOptions()
|
const options = getOptions()
|
||||||
const vm = wrapper.vm as any
|
const vm = wrapper.vm as any
|
||||||
expect(vm.value).toBe('')
|
expect(vm.value).toBe('')
|
||||||
|
expect(wrapper.find('.el-input__inner').element.value).toBe('')
|
||||||
options[2].click()
|
options[2].click()
|
||||||
await nextTick()
|
await nextTick()
|
||||||
expect(vm.value).toBe('选项3')
|
expect(vm.value).toBe('选项3')
|
||||||
|
expect(wrapper.find('.el-input__inner').element.value).toBe('蚵仔煎')
|
||||||
expect(vm.count).toBe(1)
|
expect(vm.count).toBe(1)
|
||||||
await nextTick()
|
|
||||||
options[4].click()
|
options[4].click()
|
||||||
|
await nextTick()
|
||||||
expect(vm.value).toBe('选项5')
|
expect(vm.value).toBe('选项5')
|
||||||
|
expect(wrapper.find('.el-input__inner').element.value).toBe('北京烤鸭')
|
||||||
expect(vm.count).toBe(2)
|
expect(vm.count).toBe(2)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user