fix(short-drama-agent-front): 修复代码格式检查问题
This commit is contained in:
1 parent
81d6a85260
commit
48fce3975f
87 files changed
+5714
-1436
No files matched your search
@@ -67,7 +67,9 @@ describe('精简入口保留功能', () => {
|
||||
|
||||
it('未编辑要求时完整保留原有多行条目,不按换行拆开已保存内容', async () => {
|
||||
const requirements = ['只使用古代服装\n保留角色配饰', '保持人物外观一致']
|
||||
wrapper = mount(StyleEditor, { props: { visualStyle: styleFixture({ hardConstraints: requirements }), disabled: false } })
|
||||
wrapper = mount(StyleEditor, {
|
||||
props: { visualStyle: styleFixture({ hardConstraints: requirements }), disabled: false }
|
||||
})
|
||||
await wrapper.get('form').trigger('submit')
|
||||
await flushPromises()
|
||||
expect(wrapper.emitted('save')?.[0]?.[0]).toMatchObject({ hardConstraints: requirements })
|
||||
@@ -75,7 +77,9 @@ describe('精简入口保留功能', () => {
|
||||
|
||||
it('旧格式要求只读核对,保存其他设置不会用空白要求覆盖旧内容', async () => {
|
||||
const legacy = { legacyRules: ['完整保留旧要求'] }
|
||||
wrapper = mount(StyleEditor, { props: { visualStyle: styleFixture({ hardConstraints: legacy }), disabled: false } })
|
||||
wrapper = mount(StyleEditor, {
|
||||
props: { visualStyle: styleFixture({ hardConstraints: legacy }), disabled: false }
|
||||
})
|
||||
expect(wrapper.get('#style-constraints').attributes('disabled')).toBeDefined()
|
||||
await wrapper.get('form').trigger('submit')
|
||||
await flushPromises()
|
||||
|
||||
@@ -138,7 +138,10 @@ describe('统一的 Naive UI 表单校验', () => {
|
||||
await input('#style-name', '手工风格')
|
||||
await input('#style-constraints', '真人写实\n\n 只用古代服装 ')
|
||||
await submit()
|
||||
expect(wrapper.emitted('save')?.[0]?.[0]).toMatchObject({ name: '手工风格', hardConstraints: ['真人写实', '只用古代服装'] })
|
||||
expect(wrapper.emitted('save')?.[0]?.[0]).toMatchObject({
|
||||
name: '手工风格',
|
||||
hardConstraints: ['真人写实', '只用古代服装']
|
||||
})
|
||||
expect(wrapper.get('#style-constraints').isVisible()).toBe(true)
|
||||
})
|
||||
|
||||
|
||||
@@ -505,7 +505,10 @@ describe('管理后台组件边界', () => {
|
||||
expect(wrapper.get('.project-view .workspace-page').text()).toBe(path)
|
||||
}
|
||||
expect(detail).toHaveBeenCalledOnce()
|
||||
expect(wrapper.findAll('.project-header .n-button').map(button => button.text())).toEqual(['制作前检查', '项目配置'])
|
||||
expect(wrapper.findAll('.project-header .n-button').map(button => button.text())).toEqual([
|
||||
'制作前检查',
|
||||
'项目配置'
|
||||
])
|
||||
expect(wrapper.find('.project-header [aria-label="刷新项目"]').exists()).toBe(false)
|
||||
expect(wrapper.find('.project-header .n-tag').exists()).toBe(false)
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user