* [task#144776,doing,0.1h,6h] Optimize execution batchupdate unit test script.
This commit is contained in:
@@ -7,24 +7,38 @@ su('admin');
|
||||
|
||||
$execution = zenData('project');
|
||||
$execution->id->range('1-5');
|
||||
$execution->project->range('1');
|
||||
$execution->name->range('项目集1,项目1,迭代1,阶段1,看板1');
|
||||
$execution->type->range('program,project,sprint,stage,kanban');
|
||||
$execution->model->range('{1},scrum,{3}');
|
||||
$execution->parent->range('0,1,2{3}');
|
||||
$execution->status->range('wait{3},suspended,closed,doing');
|
||||
$execution->openedBy->range('admin,user1');
|
||||
$execution->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD');
|
||||
$execution->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD');
|
||||
$execution->gen(5);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->batchUpdate();
|
||||
timeout=0
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试批量修改任务 >> name,迭代1,批量修改执行一
|
||||
测试name为空 >> 『执行名称』不能为空。
|
||||
- 测试批量修改任务
|
||||
- 第0条的field属性 @name
|
||||
- 第0条的old属性 @迭代1
|
||||
- 第0条的new属性 @批量修改执行一
|
||||
- 测试批量修改任务
|
||||
- 第1条的field属性 @PM
|
||||
- 第1条的old属性 @~~
|
||||
- 第1条的new属性 @outside100
|
||||
- 测试批量修改任务
|
||||
- 第2条的field属性 @begin
|
||||
- 第2条的old属性 @2025-03-06
|
||||
- 第2条的new属性 @2025-06-04
|
||||
- 测试批量修改任务
|
||||
- 第3条的field属性 @end
|
||||
- 第3条的old属性 @2025-07-11
|
||||
- 第3条的new属性 @2025-06-09
|
||||
- 测试name为空第name条的0属性 @~f:名称』不能为空。$~
|
||||
|
||||
*/
|
||||
|
||||
@@ -40,5 +54,9 @@ $normal = array('name' => $name, 'status'=> $statuses, 'code' => $code, 'PM' =>
|
||||
$noName = array('status'=> $statuses, 'code' => $code, 'PM' => $pms, 'lifetime' => $lifetimes, 'days' => $days);
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->batchUpdateObject($normal, $executionID)) && p('0:field,old,new') && e('name,迭代1,批量修改执行一'); // 测试批量修改任务
|
||||
r($execution->batchUpdateObject($noName, $executionID)) && p('name:0') && e('~f:名称』不能为空。$~'); // 测试name为空
|
||||
$result = $execution->batchUpdateObject($normal, $executionID);
|
||||
r($result) && p('0:field,old,new') && e('name,迭代1,批量修改执行一'); // 测试批量修改任务
|
||||
r($result) && p('1:field,old,new') && e('PM,~~,outside100'); // 测试批量修改任务
|
||||
r($result) && p('2:field,old,new') && e('begin,2025-03-06,2025-06-04'); // 测试批量修改任务
|
||||
r($result) && p('3:field,old,new') && e('end,2025-07-11,2025-06-09'); // 测试批量修改任务
|
||||
r($execution->batchUpdateObject($noName, $executionID)) && p('name:0') && e('~f:名称』不能为空。$~'); // 测试name为空
|
||||
|
||||
Reference in New Issue
Block a user