From d5604ae963858ecb646fe454e67cddb9783f3d79 Mon Sep 17 00:00:00 2001 From: yulujie Date: Thu, 7 Nov 2024 10:09:16 +0800 Subject: [PATCH] * [task#131846,done,1h] Add cases of storykanban. --- .../test/lib/storykanban.ui.class.php | 4 +-- module/execution/test/ui/storykanban.php | 36 ++++++++++++------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/module/execution/test/lib/storykanban.ui.class.php b/module/execution/test/lib/storykanban.ui.class.php index 72ec8a8091..55c18fd17f 100644 --- a/module/execution/test/lib/storykanban.ui.class.php +++ b/module/execution/test/lib/storykanban.ui.class.php @@ -17,7 +17,7 @@ class storykanbanTester extends tester $form->dom->kanbanBtn->click(); $form->wait(1); preg_match_all('/\d+(?:\.\d+)?/', $form->dom->$stage->getText(), $matches); - if($matches[0][0] != $num) return $this->failed("$stage列数据有误"); - return $this->success("$stage列数据正确"); + if($matches[0][0] != $num) return $this->failed("{$stage}列数据有误"); + return $this->success("{$stage}列数据正确"); } } diff --git a/module/execution/test/ui/storykanban.php b/module/execution/test/ui/storykanban.php index 23d57855e1..89cf324d96 100644 --- a/module/execution/test/ui/storykanban.php +++ b/module/execution/test/ui/storykanban.php @@ -41,32 +41,44 @@ $projectproduct->gen(2); $story = zenData('story'); $story->id->range('1-100'); -$story->parent->range('0{3}, 3{2}'); -$story->isParent->range('0{2}, 1, 0{2}'); -$story->root->range('1, 2, 3{3}'); -$story->path->range('`,1,`, `,2,`, `,3,`, `,3,4,`, `,3,5,`'); -$story->grade->range('1{3}, 2{2}'); +$story->parent->range('0{3}, 3{2}, 0{100}'); +$story->isParent->range('0{2}, 1, 0{100}'); +$story->root->range('1, 2, 3{3}, 6-100'); +$story->path->range('`,1,`, `,2,`, `,3,`, `,3,4,`, `,3,5,`, `,6,`, `,7,`, `,8,`, `,9,`, `,10,`'); +$story->grade->range('1{3}, 2{2}, 1{100}'); $story->product->range('1'); $story->title->range('1-100'); $story->type->range('story'); $story->estimate->range('0'); $story->status->range('active'); -$story->stage->range('projected{2}, developing, testing{2} '); +$story->stage->range('projected{2}, developing, testing{2}, developed, tested, verified{2}, released'); $story->assignedTo->range('[]'); $story->version->range('1'); -$story->gen(5); +$story->gen(10); $storySpec = zenData('storyspec'); $storySpec->story->range('1-100'); $storySpec->version->range('1'); $storySpec->title->range('1-100'); -$storySpec->gen(3); +$storySpec->gen(10); $projectStory = zenData('projectstory'); -$projectStory->project->range('1{5}, 2{5}'); +$projectStory->project->range('1{10}, 2{10}'); $projectStory->product->range('1'); $projectStory->branch->range('0'); -$projectStory->story->range('1-5 '); +$projectStory->story->range('1-10 '); $projectStory->version->range('1'); -$projectStory->order->range('1-5'); -$projectStory->gen(10); +$projectStory->order->range('1-10'); +$projectStory->gen(20); + +$tester = new storykanbanTester(); +$tester->login(); + +r($tester->check('projected', '2')) && p('status,message') && e('SUCCESS,projected列数据有误'); +r($tester->check('developing', '1')) && p('status,message') && e('SUCCESS,developing列数据有误'); +r($tester->check('developed', '1')) && p('status,message') && e('SUCCESS,developed列数据有误'); +r($tester->check('testing', '2')) && p('status,message') && e('SUCCESS,testing列数据有误'); +r($tester->check('tested', '1')) && p('status,message') && e('SUCCESS,tested列数据有误'); +r($tester->check('accepted', '2')) && p('status,message') && e('SUCCESS,accepted列数据有误'); +r($tester->check('released', '1')) && p('status,message') && e('SUCCESS,released列数据有误'); +$tester->closeBrowser();