From be94a856979c6c389a829bcdefa2eab3291da98c Mon Sep 17 00:00:00 2001 From: yulujie Date: Tue, 15 Jul 2025 10:03:34 +0800 Subject: [PATCH 1/5] *[uitest] Fix bug. --- .../test/lib/closeinlite.ui.class.php | 4 +- .../test/lib/createinlite.ui.class.php | 4 +- module/execution/test/ui/createinlite.php | 39 +++++++++++++++---- 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/module/execution/test/lib/closeinlite.ui.class.php b/module/execution/test/lib/closeinlite.ui.class.php index a6a43591fb..655d4dce46 100644 --- a/module/execution/test/lib/closeinlite.ui.class.php +++ b/module/execution/test/lib/closeinlite.ui.class.php @@ -12,8 +12,6 @@ class closeExecutionTester extends tester */ public function inputFields($realEnd, $executionId) { - $this->switchVision('lite'); - $this->page->wait(5); $viewForm = $this->initForm('execution', 'view', array('execution' => $executionId), 'appIframe-project'); $viewForm->wait(1); $realBegan = $viewForm->dom->realBeganView->getText(); @@ -64,6 +62,8 @@ class closeExecutionTester extends tester */ public function closeWithGreaterDate($realEnd, $executionId) { + $this->switchVision('lite'); + $this->page->wait(5); $this->inputFields($realEnd, $executionId); $form = $this->loadPage(); $field = $form->dom->realEndField->getText(); diff --git a/module/execution/test/lib/createinlite.ui.class.php b/module/execution/test/lib/createinlite.ui.class.php index cf34739b8e..fa3c696a39 100755 --- a/module/execution/test/lib/createinlite.ui.class.php +++ b/module/execution/test/lib/createinlite.ui.class.php @@ -11,8 +11,6 @@ class createExecutionTester extends tester */ public function inputFields($execution) { - $this->switchVision('lite'); - $this->page->wait(5); $form = $this->initForm('execution', 'create', '', 'appIframe-project'); $form->wait(1); if(isset($execution['project'])) $form->dom->project->picker($execution['project']); @@ -90,6 +88,8 @@ class createExecutionTester extends tester */ public function create($execution, $module = 'execution') { + $this->switchVision('lite'); + $this->page->wait(5); $this->inputFields($execution); /* 创建成功会跳转至看板列表全部标签下,从url中获取status字段内容 */ diff --git a/module/execution/test/ui/createinlite.php b/module/execution/test/ui/createinlite.php index 47009b4fd9..cf09e003ab 100755 --- a/module/execution/test/ui/createinlite.php +++ b/module/execution/test/ui/createinlite.php @@ -6,6 +6,38 @@ title=运营界面创建看板 timeout=0 cid=1 + +- 创建看板成功 + - 最终测试状态 @SUCCESS + - 测试结果 @创建看板成功 +- 看板名称为空,创建失败 + - 最终测试状态 @SUCCESS + - 测试结果 @创建看板表单页提示信息正确 +- 看板代号为空,创建失败 + - 最终测试状态 @SUCCESS + - 测试结果 @创建看板表单页提示信息正确 +- 计划开始时间为空,创建失败 + - 最终测试状态 @SUCCESS + - 测试结果 @创建看板表单页提示信息正确 +- 计划结束时间为空,创建失败 + - 最终测试状态 @SUCCESS + - 测试结果 @创建看板表单页提示信息正确 +- 不同项目下同名看板、代号,创建成功 + - 最终测试状态 @SUCCESS + - 测试结果 @创建看板成功 +- 看板名称重复,创建失败 + - 最终测试状态 @SUCCESS + - 测试结果 @创建看板表单页提示信息正确 +- 看板代号重复,创建失败 + - 最终测试状态 @SUCCESS + - 测试结果 @创建看板表单页提示信息正确 +- 看板的计划开始时间早于项目的计划开始时间,创建失败 + - 最终测试状态 @SUCCESS + - 测试结果 @创建看板表单页提示信息正确 +- 看板的计划结束时间晚于项目的计划结束时间,创建失败 + - 最终测试状态 @SUCCESS + - 测试结果 @创建看板表单页提示信息正确 + */ chdir(__DIR__); @@ -46,13 +78,6 @@ $projectProduct->branch->range('0'); $projectProduct->plan->range('0'); $projectProduct->gen(2); -zenData('branch')->gen(0); -zenData('design')->gen(0); -zenData('story')->gen(0); -zenData('action')->gen(0); -zenData('actionrecent')->gen(0); -zenData('history')->gen(0); - $tester = new createExecutionTester(); $tester->login(); From 0b4bf13ef74be04c374349160a4157bb81d23c94 Mon Sep 17 00:00:00 2001 From: yulujie Date: Tue, 15 Jul 2025 10:04:13 +0800 Subject: [PATCH 2/5] *[uitest] Fix bug. --- module/execution/test/ui/dynamic.php | 8 ++++---- module/execution/test/ui/grouptask.php | 8 ++++---- module/execution/test/ui/manageproducts.php | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/module/execution/test/ui/dynamic.php b/module/execution/test/ui/dynamic.php index 8c3d1bac26..269fdda883 100644 --- a/module/execution/test/ui/dynamic.php +++ b/module/execution/test/ui/dynamic.php @@ -36,12 +36,12 @@ $project->acl->range('open'); $project->status->range('doing'); $project->gen(3); -$projectproduct = zenData('projectproduct'); -$projectproduct->project->range('1, 2'); -$projectproduct->product->range('1'); +$projectProduct = zenData('projectproduct'); +$projectProduct->project->range('1, 2'); +$projectProduct->product->range('1'); $projectProduct->branch->range('0'); $projectProduct->plan->range('0'); -$projectproduct->gen(2); +$projectProduct->gen(2); $team = zenData('team'); $team->root->range('1{3}, 2{3}, 3{3}'); diff --git a/module/execution/test/ui/grouptask.php b/module/execution/test/ui/grouptask.php index 566344f9c6..3fd183f2d3 100644 --- a/module/execution/test/ui/grouptask.php +++ b/module/execution/test/ui/grouptask.php @@ -42,12 +42,12 @@ $project->acl->range('open'); $project->status->range('doing'); $project->gen(2); -$projectproduct = zenData('projectproduct'); -$projectproduct->project->range('1, 2'); -$projectproduct->product->range('1'); +$projectProduct = zenData('projectproduct'); +$projectProduct->project->range('1, 2'); +$projectProduct->product->range('1'); $projectProduct->branch->range('0'); $projectProduct->plan->range('0'); -$projectproduct->gen(2); +$projectProduct->gen(2); $story = zenData('story'); $story->id->range('1-100'); diff --git a/module/execution/test/ui/manageproducts.php b/module/execution/test/ui/manageproducts.php index b6131b34be..9d59de6610 100644 --- a/module/execution/test/ui/manageproducts.php +++ b/module/execution/test/ui/manageproducts.php @@ -49,12 +49,12 @@ $execution->acl->range('open'); $execution->status->range('wait'); $execution->gen(5, false); -$projectproduct = zenData('projectproduct'); -$projectproduct->project->range('1{3}, 2, 3{2}, 4{2}, 5-9, 9'); -$projectproduct->product->range('1-3, 5, 1, 2, 1, 2, 1{2}, 5, 1{2}, 2'); +$projectProduct = zenData('projectproduct'); +$projectProduct->project->range('1{3}, 2, 3{2}, 4{2}, 5-9, 9'); +$projectProduct->product->range('1-3, 5, 1, 2, 1, 2, 1{2}, 5, 1{2}, 2'); $projectProduct->branch->range('0'); $projectProduct->plan->range('0'); -$projectproduct->gen(14); +$projectProduct->gen(14); $tester = new manageProductsTester(); $tester->login(); From 86f0cf3add46ea052a9f6d5f58d42e878b5675aa Mon Sep 17 00:00:00 2001 From: yulujie Date: Tue, 15 Jul 2025 10:08:02 +0800 Subject: [PATCH 3/5] *[uitest] Fix bug. --- module/execution/test/ui/storykanban.php | 31 +++++++++++++++++++++--- module/execution/test/ui/taskkanban.php | 21 ++++++++++++---- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/module/execution/test/ui/storykanban.php b/module/execution/test/ui/storykanban.php index 61322ae581..61db48ac79 100644 --- a/module/execution/test/ui/storykanban.php +++ b/module/execution/test/ui/storykanban.php @@ -5,6 +5,29 @@ title=需求看板 timeout=0 cid=1 + +- 执行tester模块的check方法,参数是'projected', '2'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @projected列数据正确 +- 执行tester模块的check方法,参数是'developing', '1'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @developing列数据正确 +- 执行tester模块的check方法,参数是'developed', '1'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @developed列数据正确 +- 执行tester模块的check方法,参数是'testing', '2'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @testing列数据正确 +- 执行tester模块的check方法,参数是'tested', '1'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @tested列数据正确 +- 执行tester模块的check方法,参数是'accepted', '2'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @accepted列数据正确 +- 执行tester模块的check方法,参数是'released', '1'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @released列数据正确 + */ chdir(__DIR__); @@ -34,12 +57,12 @@ $project->acl->range('open'); $project->status->range('doing'); $project->gen(2); -$projectproduct = zenData('projectproduct'); -$projectproduct->project->range('1, 2'); -$projectproduct->product->range('1'); +$projectProduct = zenData('projectproduct'); +$projectProduct->project->range('1, 2'); +$projectProduct->product->range('1'); $projectProduct->branch->range('0'); $projectProduct->plan->range('0'); -$projectproduct->gen(2); +$projectProduct->gen(2); $story = zenData('story'); $story->id->range('1-100'); diff --git a/module/execution/test/ui/taskkanban.php b/module/execution/test/ui/taskkanban.php index 775966240e..fe2a061f79 100755 --- a/module/execution/test/ui/taskkanban.php +++ b/module/execution/test/ui/taskkanban.php @@ -2,9 +2,20 @@ acl->range('open'); $project->status->range('doing'); $project->gen(2); -$projectproduct = zenData('projectproduct'); -$projectproduct->project->range('1, 2'); -$projectproduct->product->range('1'); +$projectProduct = zenData('projectproduct'); +$projectProduct->project->range('1, 2'); +$projectProduct->product->range('1'); $projectProduct->branch->range('0'); $projectProduct->plan->range('0'); -$projectproduct->gen(2); +$projectProduct->gen(2); $story = zenData('story'); $story->id->range('1-100'); From 1c723fd076d9633483119883891374a22063a3d3 Mon Sep 17 00:00:00 2001 From: yulujie Date: Tue, 15 Jul 2025 10:08:14 +0800 Subject: [PATCH 4/5] *[uitest] Fix bug. --- module/execution/test/ui/tree.php | 37 +++++++++++++++++++++++++++---- module/execution/test/ui/view.php | 22 ++++++++++++++---- 2 files changed, 51 insertions(+), 8 deletions(-) diff --git a/module/execution/test/ui/tree.php b/module/execution/test/ui/tree.php index 9f0c9f686b..2d71a70c87 100644 --- a/module/execution/test/ui/tree.php +++ b/module/execution/test/ui/tree.php @@ -5,6 +5,35 @@ title=树状图 timeout=0 cid=1 + +- 执行tester模块的checkTreeData方法,参数是'firstLevel', '4'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @数据正确 +- 执行tester模块的checkTreeData方法,参数是'secondLevelA', '7'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @数据正确 +- 执行tester模块的checkTreeData方法,参数是'secondLevelB', '1'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @数据正确 +- 执行tester模块的checkTreeData方法,参数是'thirdLevelB', '2'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @数据正确 +- 执行tester模块的checkTreeData方法,参数是'fourthLevelB', '1'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @数据正确 +- 执行tester模块的checkTreeData方法,参数是'firstLevel', '2', true▫ + - 最终测试状态 @SUCCESS + - 测试结果 @数据正确 +- 执行tester模块的checkTreeData方法,参数是'secondLevelA', '1')▫▫ + - 最终测试状态 @SUCCESS + - 测试结果 @数据正确 +- 执行tester模块的checkTreeData方法,参数是'thirdLevelB', '1'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @数据正确 +- 执行tester模块的checkDetail方法▫ + - 最终测试状态 @SUCCESS + - 测试结果 @详情数据正确 + */ chdir(__DIR__); @@ -34,12 +63,12 @@ $project->acl->range('open'); $project->status->range('doing'); $project->gen(2); -$projectproduct = zenData('projectproduct'); -$projectproduct->project->range('1{2}, 2{2}'); -$projectproduct->product->range('1, 2'); +$projectProduct = zenData('projectproduct'); +$projectProduct->project->range('1{2}, 2{2}'); +$projectProduct->product->range('1, 2'); $projectProduct->branch->range('0'); $projectProduct->plan->range('0'); -$projectproduct->gen(4); +$projectProduct->gen(4); $story = zenData('story'); $story->id->range('1-100'); diff --git a/module/execution/test/ui/view.php b/module/execution/test/ui/view.php index 8531a2d827..e99f3484e6 100644 --- a/module/execution/test/ui/view.php +++ b/module/execution/test/ui/view.php @@ -5,6 +5,20 @@ title=概况页面 timeout=0 cid=1 + +- 执行tester模块的checkBasic方法,参数是$basic▫ + - 最终测试状态 @SUCCESS + - 测试结果 @执行基础信息正确 +- 执行tester模块的checkProduct方法,参数是'产品1'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @产品信息正确 +- 执行tester模块的checkMember方法,参数是'admin', 'USER1'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @团队成员信息正确 +- 执行tester模块的checkDoclib方法,参数是'执行库1', '执行库2'▫ + - 最终测试状态 @SUCCESS + - 测试结果 @文档库信息正确 + */ chdir(__DIR__); @@ -32,12 +46,12 @@ $project->acl->range('open'); $project->status->range('doing'); $project->gen(3); -$projectproduct = zenData('projectproduct'); -$projectproduct->project->range('2{2}, 3'); -$projectproduct->product->range('1, 2, 1'); +$projectProduct = zenData('projectproduct'); +$projectProduct->project->range('2{2}, 3'); +$projectProduct->product->range('1, 2, 1'); $projectProduct->branch->range('0'); $projectProduct->plan->range('0'); -$projectproduct->gen(3); +$projectProduct->gen(3); $user = zenData('user'); $user->id->range('1-100'); From 0c32faf20a9ab15d26c3c1449eb771bc773851e6 Mon Sep 17 00:00:00 2001 From: yulujie Date: Tue, 15 Jul 2025 10:19:57 +0800 Subject: [PATCH 5/5] *[uitest] Add refresh. --- module/execution/test/lib/closeinlite.ui.class.php | 2 +- module/execution/test/lib/createinlite.ui.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/test/lib/closeinlite.ui.class.php b/module/execution/test/lib/closeinlite.ui.class.php index 655d4dce46..40a6d1efe6 100644 --- a/module/execution/test/lib/closeinlite.ui.class.php +++ b/module/execution/test/lib/closeinlite.ui.class.php @@ -63,7 +63,7 @@ class closeExecutionTester extends tester public function closeWithGreaterDate($realEnd, $executionId) { $this->switchVision('lite'); - $this->page->wait(5); + $this->page->wait(5)->refresh(); $this->inputFields($realEnd, $executionId); $form = $this->loadPage(); $field = $form->dom->realEndField->getText(); diff --git a/module/execution/test/lib/createinlite.ui.class.php b/module/execution/test/lib/createinlite.ui.class.php index fa3c696a39..8ca2c54771 100755 --- a/module/execution/test/lib/createinlite.ui.class.php +++ b/module/execution/test/lib/createinlite.ui.class.php @@ -89,7 +89,7 @@ class createExecutionTester extends tester public function create($execution, $module = 'execution') { $this->switchVision('lite'); - $this->page->wait(5); + $this->page->wait(5)->refresh(); $this->inputFields($execution); /* 创建成功会跳转至看板列表全部标签下,从url中获取status字段内容 */