fix(short-drama-agent-front): 修复测试警告与请求模拟

This commit is contained in:
GJ committed 2026-10-15 18:10:19 +08:00
1 parent 46f54548c7
commit a9370cdf50
8 files changed
+67 -18

No files matched your search

+5 -1
View File
@@ -1,4 +1,5 @@
import { h } from 'vue'
import { routerLinkStubs } from '../../fixtures/router'
import { mount, type VueWrapper } from '@vue/test-utils'
import { afterEach, describe, expect, it, vi } from 'vitest'
import {
@@ -280,7 +281,10 @@ describe('全站平面主题', () => {
it('风格参考图页内只保留添加入口,缩略图在宽屏下保持紧凑', () => {
const css = readAllStyles()
wrapper = mount(StyleImages, { props: { projectId: 'theme-test-project', images: [], disabled: false } })
wrapper = mount(StyleImages, {
global: { stubs: routerLinkStubs },
props: { projectId: 'theme-test-project', images: [], disabled: false }
})
expect(wrapper.find('form').exists()).toBe(false)
expect(wrapper.findAll('button').map(button => button.text())).toEqual(['从资产库添加', '通过链接添加'])
expect(css).toMatch(