mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-15 02:40:46 +08:00
test(components): [select] add case for disabled and automatic-dropdown (#18112)
This commit is contained in:
parent
f365724f77
commit
c90ebf8ca4
@ -2751,4 +2751,32 @@ describe('Select', () => {
|
||||
await (vm.multiple = false)
|
||||
expect(vm.value).toBe(undefined)
|
||||
})
|
||||
|
||||
// case #18022
|
||||
it('should be do not expend options when select is disabled', async () => {
|
||||
const value = null
|
||||
const wrapper = _mount(
|
||||
`
|
||||
<el-select v-model="value"
|
||||
filterable
|
||||
automatic-dropdown
|
||||
disabled
|
||||
>
|
||||
<el-option value="1">1</el-option>
|
||||
<el-option value="2">2</el-option>
|
||||
</el-option>
|
||||
</el-select>
|
||||
`,
|
||||
() => ({
|
||||
value,
|
||||
})
|
||||
)
|
||||
await nextTick()
|
||||
await wrapper.find(`.${WRAPPER_CLASS_NAME}`).trigger('focus')
|
||||
await nextTick()
|
||||
expect(
|
||||
(document.querySelector('.el-select__popper') as HTMLElement).style
|
||||
.display
|
||||
).toBe('none')
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user