diff --git a/module/execution/test/execution.class.php b/module/execution/test/execution.class.php index a420e4ded5..61c3c3a79e 100644 --- a/module/execution/test/execution.class.php +++ b/module/execution/test/execution.class.php @@ -128,21 +128,6 @@ class executionTest return $this->executionModel->saveState($executionID, $executions); } - /** - * Create the select code of executions. - * - * @param int $executionID - * @param string $currentModule - * @param string $currentMethod - * @access public - * @return void - */ - public function selectTest($executionID, $currentModule, $currentMethod) - { - $executions = $this->executionModel->getPairs(); - return $this->executionModel->select($executions, $executionID, 0, $currentModule, $currentMethod); - } - /** * Check the privilege. * @@ -2472,19 +2457,6 @@ class executionTest return $lang->execution->menu; } - /** - * Get switcher. - * - * @param int $executionID - * @param string $method - * @access public - * @return string - */ - public function getSwitcherTest($executionID = 0, $method = '') - { - return $this->executionModel->getSwitcher($executionID, 'execution', $method); - } - /** * Test sync no multiple sprint. * @@ -2610,7 +2582,6 @@ class executionTest $products = $this->executionModel->loadModel('product')->getProducts($executionID); $branchGroups = $this->executionModel->loadModel('branch')->getByProducts(array_keys($products)); $this->executionModel->buildStorySearchForm($products, $branchGroups, array(), $queryID, 'searchStory', 'executionStory', $execution); - a(json_decode($_SESSION['executionStorysearchParams']['fieldParams'])); return $_SESSION['executionStorysearchParams']['queryID']; } diff --git a/module/execution/test/model/activate.php b/module/execution/test/model/activate.php index 6e7d42db5a..ba58881e24 100755 --- a/module/execution/test/model/activate.php +++ b/module/execution/test/model/activate.php @@ -32,13 +32,13 @@ pid=1 */ $executionIDList = array(1,2,3,4,5); -$readjustTask = array('readjustTime' => '1', 'readjustTask' => '1'); -$readjustTime = array('readjustTime' => '1'); +$readjustTask = array('readjustTask' => '1'); +$readjustTime = array(); $executionTester = new executionTest(); -r($executionTester->activateTest($executionIDList[0])) && p('0:field,old,new') && e('status,suspended,doing'); // 敏捷执行激活 -r($executionTester->activateTest($executionIDList[1])) && p('0:field,old,new') && e('status,suspended,doing'); // 瀑布执行激活 +r($executionTester->activateTest($executionIDList[0])) && p('0:field,old,new') && e('status,suspended,wait'); // 敏捷执行激活 +r($executionTester->activateTest($executionIDList[1])) && p('0:field,old,new') && e('status,suspended,wait'); // 瀑布执行激活 r($executionTester->activateTest($executionIDList[2])) && p('0:field,old,new') && e('status,suspended,doing'); // 看板执行激活 r($executionTester->activateTest($executionIDList[3],$readjustTime)) && p('1:field') && e('begin'); // 修改激活时间 r($executionTester->activateTest($executionIDList[4],$readjustTask)) && p('1:field') && e('begin'); // 修改顺延 -r($executionTester->activateTest($executionIDList[3], array(), true)) && p('status') && e('doing'); // 子瀑布激活获取父瀑布状态 +r($executionTester->activateTest($executionIDList[3], array(), true)) && p('status') && e('wait'); // 子瀑布激活获取父瀑布状态 diff --git a/module/execution/test/model/buildbugsearchform.php b/module/execution/test/model/buildbugsearchform.php index 07a184bde7..054ac9102f 100644 --- a/module/execution/test/model/buildbugsearchform.php +++ b/module/execution/test/model/buildbugsearchform.php @@ -41,7 +41,7 @@ $bug->title->range('1-4')->prefix('Bug'); $bug->project->range('1,2,1'); $bug->execution->range('3,4,5'); $bug->task->range('1-10'); -$bug->status->range('wait,doing'); +$bug->status->range('active,resolved,closed'); $bug->gen(4); $query = zdTable('userquery'); diff --git a/module/execution/test/model/filltasksintree.php b/module/execution/test/model/filltasksintree.php index e41592bd18..873c83d56a 100644 --- a/module/execution/test/model/filltasksintree.php +++ b/module/execution/test/model/filltasksintree.php @@ -45,18 +45,15 @@ $product->type->range('task'); $product->gen(10); zdTable('team')->gen(0); +zdTable('story')->gen(0); +zdTable('projectstory')->gen(0); su('admin'); /** title=测试executionModel->fillTasksInTree(); +timeout=0 cid=1 -pid=1 - -敏捷执行查询 >> 产品1 -瀑布执行查询 >> 产品2 -看板执行查询 >> 产品1 -错误执行查询 >> 0 */ diff --git a/module/execution/test/model/fixfirst.php b/module/execution/test/model/fixfirst.php index 7e34070c02..83cf7726f3 100755 --- a/module/execution/test/model/fixfirst.php +++ b/module/execution/test/model/fixfirst.php @@ -49,9 +49,9 @@ pid=1 $executionIDList = array(3, 4); -$scrumEstimate = array('estimate' => '25'); -$withLeft = array('estimate' => '5', 'withLeft' => 1); -$waterfallEstimate = array('estimate' => '17', 'withLeft' => 1); +$scrumEstimate = array('date' => '2022-01-12', 'estimate' => '25'); +$withLeft = array('date' => '2022-01-12', 'estimate' => '5', 'withLeft' => 1); +$waterfallEstimate = array('date' => '2022-01-12', 'estimate' => '17', 'withLeft' => 1); $date = '2022-01-12'; $executionTester = new executionTest(); diff --git a/module/execution/test/model/getbyproject.php b/module/execution/test/model/getbyproject.php index bca2cce460..d50b1a7cb9 100755 --- a/module/execution/test/model/getbyproject.php +++ b/module/execution/test/model/getbyproject.php @@ -39,19 +39,19 @@ $appendIdList = array(0, 7); $count = array(0, 1); $executionTester = new executionTest(); -r($executionTester->getByProjectTest($projectIdList[1], $status[0], $limit[0], $pairsList[0], $develList[0], $appendIdList[0], $count[0])) && p('5:project,name,type') && e('2,迭代1,sprint'); // 敏捷项目执行列表查询 -r($executionTester->getByProjectTest($projectIdList[2], $status[0], $limit[0], $pairsList[0], $develList[0], $appendIdList[0], $count[0])) && p('6:project,name,type') && e('3,产品1/阶段1,stage'); // 瀑布项目执行列表查询 -r($executionTester->getByProjectTest($projectIdList[3], $status[0], $limit[0], $pairsList[0], $develList[0], $appendIdList[0], $count[0])) && p('7:project,name,type') && e('4,看板1,kanban'); // 看板项目执行列表查询 -r($executionTester->getByProjectTest($projectIdList[0], $status[1], $limit[0], $pairsList[0], $develList[0], $appendIdList[0], $count[0])) && p() && e('0'); // wait执行列表查询 -r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[0], $pairsList[0], $develList[0], $appendIdList[0], $count[0])) && p('7:status,name') && e('doing,看板1'); // doing执行列表查询 -r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[1], $pairsList[0], $develList[0], $appendIdList[0], $count[1])) && p() && e('2'); // 执行列表2条查询 -r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[2], $pairsList[0], $develList[0], $appendIdList[0], $count[1])) && p() && e('3'); // 执行列表10条查询 -r($executionTester->getByProjectTest($projectIdList[1], $status[0], $limit[0], $pairsList[1], $develList[0], $appendIdList[0], $count[0])) && p('5') && e('项目1/迭代1'); // 敏捷项目执行键值对查询 -r($executionTester->getByProjectTest($projectIdList[2], $status[0], $limit[0], $pairsList[1], $develList[0], $appendIdList[0], $count[0])) && p('6') && e('项目2/产品1/阶段1'); // 瀑布项目执行键值对查询 -r($executionTester->getByProjectTest($projectIdList[3], $status[0], $limit[0], $pairsList[1], $develList[0], $appendIdList[0], $count[0])) && p('7') && e('项目3/看板1'); // 看板项目执行键值对查询 -r($executionTester->getByProjectTest($projectIdList[0], $status[1], $limit[0], $pairsList[1], $develList[0], $appendIdList[0], $count[0])) && p() && e('0'); // wait执行键值对查询 -r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[0], $pairsList[1], $develList[0], $appendIdList[0], $count[0])) && p('7') && e('项目3/看板1'); // doing执行键值对查询 -r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[1], $pairsList[1], $develList[0], $appendIdList[0], $count[1])) && p() && e('2'); // 执行键值对2条查询 -r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[2], $pairsList[1], $develList[0], $appendIdList[0], $count[1])) && p() && e('3'); // 执行键值对10条查询 -r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[2], $pairsList[1], $develList[1], $appendIdList[0], $count[1])) && p() && e('0'); // 测试获取开发阶段 -r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[2], $pairsList[1], $develList[1], $appendIdList[1], $count[1])) && p() && e('1'); // 测试获取开发阶段或id=7的执行 +r($executionTester->getByProjectTest($projectIdList[1], $status[0], $limit[0], $pairsList[0], $develList[0], $appendIdList[0], $count[0])) && p('5:project,name,type') && e('2,迭代1,sprint'); // 敏捷项目执行列表查询 +r($executionTester->getByProjectTest($projectIdList[2], $status[0], $limit[0], $pairsList[0], $develList[0], $appendIdList[0], $count[0])) && p('6:project,name,type') && e('3,阶段1,stage'); // 瀑布项目执行列表查询 +r($executionTester->getByProjectTest($projectIdList[3], $status[0], $limit[0], $pairsList[0], $develList[0], $appendIdList[0], $count[0])) && p('7:project,name,type') && e('4,看板1,kanban'); // 看板项目执行列表查询 +r($executionTester->getByProjectTest($projectIdList[0], $status[1], $limit[0], $pairsList[0], $develList[0], $appendIdList[0], $count[0])) && p() && e('0'); // wait执行列表查询 +r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[0], $pairsList[0], $develList[0], $appendIdList[0], $count[0])) && p('7:status,name') && e('doing,看板1'); // doing执行列表查询 +r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[1], $pairsList[0], $develList[0], $appendIdList[0], $count[1])) && p() && e('2'); // 执行列表2条查询 +r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[2], $pairsList[0], $develList[0], $appendIdList[0], $count[1])) && p() && e('3'); // 执行列表10条查询 +r($executionTester->getByProjectTest($projectIdList[1], $status[0], $limit[0], $pairsList[1], $develList[0], $appendIdList[0], $count[0])) && p('5') && e('项目1/迭代1'); // 敏捷项目执行键值对查询 +r($executionTester->getByProjectTest($projectIdList[2], $status[0], $limit[0], $pairsList[1], $develList[0], $appendIdList[0], $count[0])) && p('6') && e('项目2/阶段1'); // 瀑布项目执行键值对查询 +r($executionTester->getByProjectTest($projectIdList[3], $status[0], $limit[0], $pairsList[1], $develList[0], $appendIdList[0], $count[0])) && p('7') && e('项目3/看板1'); // 看板项目执行键值对查询 +r($executionTester->getByProjectTest($projectIdList[0], $status[1], $limit[0], $pairsList[1], $develList[0], $appendIdList[0], $count[0])) && p() && e('0'); // wait执行键值对查询 +r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[0], $pairsList[1], $develList[0], $appendIdList[0], $count[0])) && p('7') && e('项目3/看板1'); // doing执行键值对查询 +r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[1], $pairsList[1], $develList[0], $appendIdList[0], $count[1])) && p() && e('2'); // 执行键值对2条查询 +r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[2], $pairsList[1], $develList[0], $appendIdList[0], $count[1])) && p() && e('3'); // 执行键值对10条查询 +r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[2], $pairsList[1], $develList[1], $appendIdList[0], $count[1])) && p() && e('0'); // 测试获取开发阶段 +r($executionTester->getByProjectTest($projectIdList[0], $status[2], $limit[2], $pairsList[1], $develList[1], $appendIdList[1], $count[1])) && p() && e('1'); // 测试获取开发阶段或id=7的执行 diff --git a/module/execution/test/model/getswitcher.php b/module/execution/test/model/getswitcher.php deleted file mode 100644 index 1188c678bd..0000000000 --- a/module/execution/test/model/getswitcher.php +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env php -id->range('1-5'); -$execution->name->range('项目集1,项目1,迭代1,阶段1,看板1'); -$execution->type->range('program,project,sprint,stage,kanban'); -$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); - -su('admin'); -/** - -title=测试 executionModel::getSwitcher(); -cid=1 -pid=1 - -查看传入空返回的下拉菜单 >> 执行 -查看传入id=1, 请求all方法的执行返回的下拉菜单 >> 0 -查看传入id=1,请求tasks方法的执行返回的下拉菜单 >> 项目集1 - -*/ -$methods = array('all', 'task'); - -$executionTester = new executionTest(); -$switcher1 = $executionTester->getSwitcherTest(0); -$switcher2 = $executionTester->getSwitcherTest(1, $methods[0]); -$switcher3 = $executionTester->getSwitcherTest(1, $methods[1]); - -r(strip_tags($switcher1)) && p() && e('执行'); // 查看传入空返回的下拉菜单 -r(strip_tags($switcher2)) && p() && e('0'); // 查看传入id=1, 请求all方法的执行返回的下拉菜单 -r(strip_tags($switcher3)) && p() && e('项目集1'); // 查看传入id=1,请求tasks方法的执行返回的下拉菜单 diff --git a/module/execution/test/model/select.php b/module/execution/test/model/select.php deleted file mode 100644 index 63653c1906..0000000000 --- a/module/execution/test/model/select.php +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env php -gen(5); -su('admin'); - -$execution = zdTable('project'); -$execution->id->range('1-5'); -$execution->name->range('项目集1,项目1,迭代1,阶段1,看板1'); -$execution->type->range('execution,project,sprint,stage,kanban'); -$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::select(); -cid=1 -pid=1 - -检查下拉菜单默认选中迭代1 >> 迭代1 - -*/ - -$executionTester = new executionTest(); -$html = $executionTester->selectTest('3', 'execution', 'all'); - -r(strip_tags($html)) && p() && e('迭代1'); // 检查下拉菜单默认选中迭代1 diff --git a/module/execution/test/model/start.php b/module/execution/test/model/start.php index 34b72c6d27..013a6f4565 100755 --- a/module/execution/test/model/start.php +++ b/module/execution/test/model/start.php @@ -21,7 +21,7 @@ pid=1 $executionIDList = array(2, 3, 4, 5); $execution = new executionTest(); -r($execution->startTest($executionIDList[0])) && p('0:field,old,new') && e('status,wait,doing'); // 敏捷执行开始 -r($execution->startTest($executionIDList[1])) && p('0:field,old,new') && e('status,wait,doing'); // 瀑布阶段开始 -r($execution->startTest($executionIDList[2])) && p('0:field,old,new') && e('status,wait,doing'); // 看板执行开始 +r($execution->startTest($executionIDList[0])) && p('1:field,old,new') && e('status,wait,doing'); // 敏捷执行开始 +r($execution->startTest($executionIDList[1])) && p('1:field,old,new') && e('status,wait,doing'); // 瀑布阶段开始 +r($execution->startTest($executionIDList[2])) && p('1:field,old,new') && e('status,wait,doing'); // 看板执行开始 r($execution->startTest($executionIDList[3], array(), true)) && p('status') && e('doing'); // 子瀑布开启获取父瀑布状态