test: 修改测试用例

This commit is contained in:
roymondchen 2022-04-12 15:05:13 +08:00 committed by jia000
parent 992ebbe3ce
commit 9ae93fc9f2
2 changed files with 9 additions and 5 deletions

View File

@ -174,7 +174,7 @@ export const fillConfig = (config: FormConfig = []) => [
type: 'select', type: 'select',
options: (mForm: FormState, { model }: any) => { options: (mForm: FormState, { model }: any) => {
const node = editorService.getNodeById(model.to); const node = editorService.getNodeById(model.to);
if (!node) return []; if (!node?.type) return [];
return eventsService.getMethod(node.type).map((option) => ({ return eventsService.getMethod(node.type).map((option) => ({
text: option.label, text: option.label,

View File

@ -28,17 +28,21 @@ describe('events', () => {
items: [ items: [
{ {
icon: 'el-icon-folder-opened', icon: 'el-icon-folder-opened',
id: 0,
reportType: 'module',
text: '组', text: '组',
type: 'container', type: 'container',
data: {
id: 0,
reportType: 'module',
},
}, },
{ {
icon: 'el-icon-files', icon: 'el-icon-files',
id: 0,
reportType: 'module',
text: '标签页(tab)', text: '标签页(tab)',
type: 'tabs', type: 'tabs',
data: {
id: 0,
reportType: 'module',
},
}, },
], ],
}, },