fix(short-drama-agent-front): 修复测试警告与请求模拟
This commit is contained in:
1 parent
46f54548c7
commit
a9370cdf50
8 files changed
+67
-18
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { imageCatalog, generationProfile } from '../../fixtures/generation'
|
||||
import { routerLinkStubs } from '../../fixtures/router'
|
||||
import { defineComponent, h, reactive } from 'vue'
|
||||
import { flushPromises, mount, type VueWrapper } from '@vue/test-utils'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
@@ -99,7 +100,8 @@ describe('统一的 Naive UI 表单校验', () => {
|
||||
title: '雨夜来信标题',
|
||||
topic: '雨夜来信',
|
||||
style: '',
|
||||
episodeCount: 3
|
||||
/** 与后端 Auto 时长预算契约一致,不再发送旧的顶层集数。 */
|
||||
durationBudget: { mode: 'auto', episodeCount: 3 }
|
||||
})
|
||||
expect(wrapper.emitted('created')).toEqual([['created', 'create-execution-1']])
|
||||
})
|
||||
@@ -147,6 +149,7 @@ describe('统一的 Naive UI 表单校验', () => {
|
||||
it('登记参考图拦截非法地址和小数排序,允许有效存储地址与负整数排序', async () => {
|
||||
wrapper = mount(StyleImages, {
|
||||
attachTo: document.body,
|
||||
global: { stubs: routerLinkStubs },
|
||||
props: { projectId: 'form-test-project', images: [], disabled: false }
|
||||
})
|
||||
expect(document.querySelector('[aria-label="风格图片地址"]')).toBeNull()
|
||||
@@ -191,6 +194,7 @@ describe('统一的 Naive UI 表单校验', () => {
|
||||
vi.stubGlobal('fetch', fetcher)
|
||||
wrapper = mount(StyleImages, {
|
||||
attachTo: document.body,
|
||||
global: { stubs: routerLinkStubs },
|
||||
props: { projectId: 'form-test-project', images: [], disabled: false }
|
||||
})
|
||||
|
||||
@@ -227,6 +231,7 @@ describe('统一的 Naive UI 表单校验', () => {
|
||||
vi.stubGlobal('fetch', fetcher)
|
||||
wrapper = mount(StyleImages, {
|
||||
attachTo: document.body,
|
||||
global: { stubs: routerLinkStubs },
|
||||
props: { projectId: 'form-test-project', images: [], disabled: true, hasStyle: false }
|
||||
})
|
||||
expect(wrapper.text()).toContain('先保存视觉风格')
|
||||
|
||||
Reference in new issue
Block a user