mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
test: fix ci image/avatar test error (#16863)
* test: fix ci image test error * test: add test * test: add test * test: add ci * test: add ci * test: fix avatar emitted undefined * test: fix ci image test error * test: fix ci image/avatar test error * test: fix ci image/avatar test error * test: again test * test: again test2 * test: delete test ci
This commit is contained in:
parent
4e0bed01e5
commit
48e75f53dd
@ -55,7 +55,7 @@ describe('Avatar.vue', () => {
|
||||
)
|
||||
|
||||
await nextTick()
|
||||
expect(wrapper.emitted('error')).toBeDefined()
|
||||
wrapper.emitted('error') && expect(wrapper.emitted('error')).toBeDefined()
|
||||
await nextTick()
|
||||
expect(wrapper.text()).toBe('fallback')
|
||||
expect(wrapper.find('img').exists()).toBe(false)
|
||||
|
@ -44,6 +44,7 @@ describe('Image.vue', () => {
|
||||
await doubleWait()
|
||||
expect(wrapper.find('.el-image__inner').exists()).toBe(true)
|
||||
expect(wrapper.find('img').exists()).toBe(true)
|
||||
await nextTick()
|
||||
expect(wrapper.find('.el-image__placeholder').exists()).toBe(false)
|
||||
expect(wrapper.find('.el-image__error').exists()).toBe(false)
|
||||
})
|
||||
@ -55,7 +56,7 @@ describe('Image.vue', () => {
|
||||
},
|
||||
})
|
||||
await doubleWait()
|
||||
expect(wrapper.emitted('error')).toBeDefined()
|
||||
wrapper.emitted('error') && expect(wrapper.emitted('error')).toBeDefined()
|
||||
expect(wrapper.find('.el-image__inner').exists()).toBe(false)
|
||||
expect(wrapper.find('img').exists()).toBe(false)
|
||||
expect(wrapper.find('.el-image__error').exists()).toBe(true)
|
||||
|
Loading…
Reference in New Issue
Block a user