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',
options: (mForm: FormState, { model }: any) => {
const node = editorService.getNodeById(model.to);
if (!node) return [];
if (!node?.type) return [];
return eventsService.getMethod(node.type).map((option) => ({
text: option.label,

View File

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