fix(short-drama-agent-front): 优化项目操作与形态图库

This commit is contained in:
GJ committed 2026-11-06 23:02:33 +08:00
1 parent 27ee9fd4ff
commit dbf97e6f98
11 files changed
+175 -109

No files matched your search

+4 -2
View File
@@ -33,10 +33,12 @@ describe('资源图片展示与原图预览', () => {
expect(wrapper.get<HTMLImageElement>('img').element.style.objectFit).toBe('contain')
})
it('图片加载前显示轻量骨架占位,加载完成后直接淡入图片并移除占位', async () => {
it('图片加载时显示无文字的占位图标,完成后展示原图', async () => {
wrapper = mount(AssetImage, { props: { src: '/storage/reveal.png', alt: '加载中的图片' } })
expect(wrapper.get('.reveal-image').attributes('aria-busy')).toBe('true')
expect(wrapper.find('.reveal-image-placeholder').exists()).toBe(true)
const placeholder = wrapper.get('.reveal-image-placeholder')
expect(placeholder.find('svg').exists()).toBe(true)
expect(placeholder.text()).toBe('')
expect(wrapper.find('.reveal-image-grid').exists()).toBe(false)
await wrapper.get('img').trigger('load')
expect(wrapper.get('.reveal-image').classes()).toContain('is-loaded')