From b46cf720a7ea9edd6dfb4602dd20b903e5ed3dd5 Mon Sep 17 00:00:00 2001 From: Chenjianyu Date: Mon, 31 Jul 2023 13:22:15 +0800 Subject: [PATCH] * fix test case function calling schema. --- module/ai/lang/en.php | 49 +++++++++++++++++++++++----------------- module/ai/lang/zh-cn.php | 38 ++++++++++++++++++------------- 2 files changed, 50 insertions(+), 37 deletions(-) diff --git a/module/ai/lang/en.php b/module/ai/lang/en.php index e962ff8497..f5c37cc023 100644 --- a/module/ai/lang/en.php +++ b/module/ai/lang/en.php @@ -634,27 +634,34 @@ $lang->ai->formSchema['testcase']['create'] = new stdclass(); $lang->ai->formSchema['testcase']['create']->title = 'Test Case'; $lang->ai->formSchema['testcase']['create']->type = 'object'; $lang->ai->formSchema['testcase']['create']->properties = new stdclass(); -$lang->ai->formSchema['testcase']['create']->properties->type = new stdclass(); -$lang->ai->formSchema['testcase']['create']->properties->stage = new stdclass(); -$lang->ai->formSchema['testcase']['create']->properties->title = new stdclass(); -$lang->ai->formSchema['testcase']['create']->properties->precondition = new stdclass(); -$lang->ai->formSchema['testcase']['create']->properties->steps = new stdclass(); -$lang->ai->formSchema['testcase']['create']->properties->expects = new stdclass(); -$lang->ai->formSchema['testcase']['create']->properties->type->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->type->description = 'Type of test case'; -$lang->ai->formSchema['testcase']['create']->properties->type->enum = array('feature', 'performance', 'config', 'install', 'security', 'interface', 'unit', 'other'); -$lang->ai->formSchema['testcase']['create']->properties->stage->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->stage->description = 'Stage of test case'; -$lang->ai->formSchema['testcase']['create']->properties->stage->enum = array('unittest', 'feature', 'intergrate', 'system', 'smoke', 'bvt'); -$lang->ai->formSchema['testcase']['create']->properties->title->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->title->description = 'Title of test case'; -$lang->ai->formSchema['testcase']['create']->properties->precondition->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->precondition->description = 'Precondition of test case'; -$lang->ai->formSchema['testcase']['create']->properties->steps->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->steps->description = 'Steps of test case'; -$lang->ai->formSchema['testcase']['create']->properties->expects->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->expects->description = 'Expectation of test case'; -$lang->ai->formSchema['testcase']['create']->required = array('type', 'title', 'steps', 'expects'); +$lang->ai->formSchema['testcase']['create']->properties->type = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->stage = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->title = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->precondition = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->steps = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->expects = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->steps->items = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->steps = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->expects = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->type->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->type->description = 'Type of test case'; +$lang->ai->formSchema['testcase']['create']->properties->type->enum = array('feature', 'performance', 'config', 'install', 'security', 'interface', 'unit', 'other'); +$lang->ai->formSchema['testcase']['create']->properties->stage->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->stage->description = 'Stage of test case'; +$lang->ai->formSchema['testcase']['create']->properties->stage->enum = array('unittest', 'feature', 'intergrate', 'system', 'smoke', 'bvt'); +$lang->ai->formSchema['testcase']['create']->properties->title->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->title->description = 'Title of test case'; +$lang->ai->formSchema['testcase']['create']->properties->precondition->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->precondition->description = 'Precondition of test case'; +$lang->ai->formSchema['testcase']['create']->properties->steps->type = 'array'; +$lang->ai->formSchema['testcase']['create']->properties->steps->description = 'Steps of test case'; +$lang->ai->formSchema['testcase']['create']->properties->steps->items->type = 'object'; +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->steps->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->steps->description = 'Step description'; +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->expects->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->expects->description = 'Expectation of step'; +$lang->ai->formSchema['testcase']['create']->required = array('type', 'title', 'steps'); $lang->ai->formSchema['testcase']['edit'] = $lang->ai->formSchema['testcase']['create']; $lang->ai->formSchema['testreport']['create'] = new stdclass(); diff --git a/module/ai/lang/zh-cn.php b/module/ai/lang/zh-cn.php index ee99e6425d..c8ccc10c51 100644 --- a/module/ai/lang/zh-cn.php +++ b/module/ai/lang/zh-cn.php @@ -639,22 +639,28 @@ $lang->ai->formSchema['testcase']['create']->properties->stage = new stdc $lang->ai->formSchema['testcase']['create']->properties->title = new stdclass(); $lang->ai->formSchema['testcase']['create']->properties->precondition = new stdclass(); $lang->ai->formSchema['testcase']['create']->properties->steps = new stdclass(); -$lang->ai->formSchema['testcase']['create']->properties->expects = new stdclass(); -$lang->ai->formSchema['testcase']['create']->properties->type->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->type->description = '用例的类型'; -$lang->ai->formSchema['testcase']['create']->properties->type->enum = array('feature', 'performance', 'config', 'install', 'security', 'interface', 'unit', 'other'); -$lang->ai->formSchema['testcase']['create']->properties->stage->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->stage->description = '用例适用阶段'; -$lang->ai->formSchema['testcase']['create']->properties->stage->enum = array('unittest', 'feature', 'intergrate', 'system', 'smoke', 'bvt'); -$lang->ai->formSchema['testcase']['create']->properties->title->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->title->description = '用例的标题'; -$lang->ai->formSchema['testcase']['create']->properties->precondition->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->precondition->description = '用例的前置条件'; -$lang->ai->formSchema['testcase']['create']->properties->steps->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->steps->description = '用例的步骤'; -$lang->ai->formSchema['testcase']['create']->properties->expects->type = 'string'; -$lang->ai->formSchema['testcase']['create']->properties->expects->description = '用例的预期结果'; -$lang->ai->formSchema['testcase']['create']->required = array('type', 'title', 'steps', 'expects'); +$lang->ai->formSchema['testcase']['create']->properties->steps->items = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->steps = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->expects = new stdclass(); +$lang->ai->formSchema['testcase']['create']->properties->type->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->type->description = '用例的类型'; +$lang->ai->formSchema['testcase']['create']->properties->type->enum = array('feature', 'performance', 'config', 'install', 'security', 'interface', 'unit', 'other'); +$lang->ai->formSchema['testcase']['create']->properties->stage->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->stage->description = '用例适用阶段'; +$lang->ai->formSchema['testcase']['create']->properties->stage->enum = array('unittest', 'feature', 'intergrate', 'system', 'smoke', 'bvt'); +$lang->ai->formSchema['testcase']['create']->properties->title->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->title->description = '用例的标题'; +$lang->ai->formSchema['testcase']['create']->properties->precondition->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->precondition->description = '用例的前置条件'; +$lang->ai->formSchema['testcase']['create']->properties->steps->type = 'array'; +$lang->ai->formSchema['testcase']['create']->properties->steps->description = '用例的步骤列表'; +$lang->ai->formSchema['testcase']['create']->properties->steps->items->type = 'object'; +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->steps->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->steps->description = '步骤的描述'; +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->expects->type = 'string'; +$lang->ai->formSchema['testcase']['create']->properties->steps->items->properties->expects->description = '步骤的预期结果'; +$lang->ai->formSchema['testcase']['create']->required = array('type', 'title', 'steps'); $lang->ai->formSchema['testcase']['edit'] = $lang->ai->formSchema['testcase']['create']; $lang->ai->formSchema['testreport']['create'] = new stdclass();