Merge branch release/21.7.7 of zentao/zentaopms (#12053)
This commit is contained in:
@@ -35,6 +35,7 @@ class closeExecutionTester extends tester
|
||||
{
|
||||
$this->inputFields($realEnd, $executionId);
|
||||
$form = $this->loadPage();
|
||||
$form->wait(1);
|
||||
if($form->dom->status->getText() != $this->lang->execution->statusList->closed) return $this->failed('执行状态错误');
|
||||
if($form->dom->realEndView->getText() != $realEnd) return $this->failed('执行实际完成日期错误');
|
||||
return $this->success('关闭执行成功');
|
||||
|
||||
@@ -37,6 +37,7 @@ class manageMembersTester extends tester
|
||||
$firstAccount = $form->dom->firstAccount->attr('value');
|
||||
$form->dom->firstDelBtn->click();
|
||||
$form->dom->btn($this->lang->save)->click();
|
||||
$form->wait(1);
|
||||
|
||||
$form = $this->loadPage('execution', 'team');
|
||||
if($form->dom->firstUser->getText() != $firstAccount) return $this->success('删除团队成员成功');
|
||||
@@ -59,7 +60,7 @@ class manageMembersTester extends tester
|
||||
$form->dom->firstRemoveBtn->click();
|
||||
$form->wait(1);
|
||||
$form->dom->alertModal();
|
||||
$form->wait(1);
|
||||
$form->wait(2);
|
||||
$numAfter = $form->dom->num->getText();
|
||||
if($numBefore == $numAfter + 1) return $this->success('移除团队成员成功');
|
||||
return $this->failed('移除团队成员失败');
|
||||
|
||||
@@ -2,6 +2,19 @@
|
||||
include dirname(__FILE__, 6) . '/test/lib/ui.php';
|
||||
class storyTester extends tester
|
||||
{
|
||||
/**
|
||||
* 打开页面。
|
||||
* Open page.
|
||||
*
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function open()
|
||||
{
|
||||
$form = $this->initForm('execution', 'story', array('execution' => '2'), 'appIframe-execution');
|
||||
$form->wait(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查Tab标签下的数据。
|
||||
* Check the data of the Tab tag.
|
||||
@@ -13,10 +26,10 @@ class storyTester extends tester
|
||||
*/
|
||||
public function checkTab($tab, $expectNum)
|
||||
{
|
||||
$form = $this->initForm('execution', 'story', array('execution' => '2'), 'appIframe-execution');
|
||||
$form->wait(3);
|
||||
$form->dom->$tab->click();
|
||||
$form = $this->loadPage();
|
||||
$form->wait(1);
|
||||
$form->dom->$tab->click();
|
||||
$form->wait(3);
|
||||
if($form->dom->num->getText() == $expectNum) return $this->success($tab . '下显示条数正确');
|
||||
return $this->failed($tab . '下显示条数不正确');
|
||||
}
|
||||
@@ -30,13 +43,13 @@ class storyTester extends tester
|
||||
*/
|
||||
public function unlinkStory()
|
||||
{
|
||||
$form = $this->initForm('execution', 'story', array('execution' => '2'), 'appIframe-execution');
|
||||
$form->wait(3);
|
||||
$form = $this->loadPage();
|
||||
$form->wait(1);
|
||||
$name = $form->dom->firstName->getText();
|
||||
$form->dom->firstUnlinkBtn->click();
|
||||
$form->wait(1);
|
||||
$form->dom->alertModal();
|
||||
$form->wait(1);
|
||||
$form->wait(3);
|
||||
|
||||
$form->dom->search(array("{$this->lang->story->name},=,{$name}"));
|
||||
$form->wait(1);
|
||||
@@ -53,15 +66,17 @@ class storyTester extends tester
|
||||
*/
|
||||
public function batchUnlinkStory()
|
||||
{
|
||||
$form = $this->initForm('execution', 'story', array('execution' => '2'), 'appIframe-execution');
|
||||
$form = $this->loadPage();
|
||||
$form->dom->allTab->click();
|
||||
$form->wait(3);
|
||||
|
||||
$name = $form->dom->firstName->getText();
|
||||
$form->dom->firstCheckbox->click();
|
||||
$form->wait(1);
|
||||
$form->dom->btn($this->lang->execution->unlinkStory)->click();
|
||||
$form->wait(1);
|
||||
$form->dom->alertModal();
|
||||
$form->wait(1);
|
||||
$form->wait(3);
|
||||
|
||||
$form->dom->search(array("{$this->lang->story->name},=,{$name}"));
|
||||
$form->wait(1);
|
||||
@@ -80,7 +95,7 @@ class storyTester extends tester
|
||||
*/
|
||||
public function batchEditPhase($status, $phase)
|
||||
{
|
||||
$form = $this->initForm('execution', 'story', array('execution' => '2'), 'appIframe-execution');
|
||||
$form = $this->initForm('execution', 'story', array('execution' => '2'), 'appIframe-execution');
|
||||
$form->wait(3);
|
||||
$storyStatus = $this->lang->story->statusList->$status;
|
||||
$storyPhase = $this->lang->story->stageList->$phase;
|
||||
@@ -88,7 +103,7 @@ class storyTester extends tester
|
||||
$form->dom->xpath['stage'] = $form->dom->xpath['phases'] . "//*[text() = '{$storyPhase}']";
|
||||
|
||||
$form->dom->search(array("{$this->lang->story->status},=,{$storyStatus}"));
|
||||
$form->wait(1);
|
||||
$form->wait(2);
|
||||
/* 因为阶段字段被遮挡,所以需要滚动到可见区域 */
|
||||
$form->dom->firstPhase->scrollToElement();
|
||||
|
||||
@@ -97,9 +112,12 @@ class storyTester extends tester
|
||||
$form->dom->phaseBtn->click();
|
||||
$form->wait(1);
|
||||
$form->dom->stage->click();
|
||||
$form->wait(1);
|
||||
if($status == 'draft' || $status == 'closed') $form->dom->alertModal();
|
||||
$form->wait(1);
|
||||
if($status == 'draft' || $status == 'closed')
|
||||
{
|
||||
$form->wait(1);
|
||||
$form->dom->alertModal();
|
||||
}
|
||||
$form->wait(2);
|
||||
|
||||
$afterPhase = $form->dom->firstPhase->getText();
|
||||
if($status == 'draft' || $status == 'closed')
|
||||
@@ -124,8 +142,9 @@ class storyTester extends tester
|
||||
*/
|
||||
public function assignTo($user)
|
||||
{
|
||||
$form = $this->initForm('execution', 'story', array('execution' => '2'), 'appIframe-execution');
|
||||
$form->dom->waitElement($form->dom->xpath['firstAssignTo'], 10);
|
||||
$form = $this->loadPage();
|
||||
$form->dom->allTab->click();
|
||||
$form->wait(3);
|
||||
$form->dom->firstAssignTo->click();
|
||||
$form->wait(1);
|
||||
$form->dom->assignedTo->picker($user);
|
||||
@@ -150,13 +169,14 @@ class storyTester extends tester
|
||||
*/
|
||||
public function batchAssignTo()
|
||||
{
|
||||
$form = $this->initForm('execution', 'story', array('execution' => '2'), 'appIframe-execution');
|
||||
$form = $this->loadPage();
|
||||
$form->wait(1);
|
||||
$form->dom->firstCheckbox->click();
|
||||
$form->wait(1);
|
||||
$form->dom->batchAssignBtn->click();
|
||||
$form->wait(1);
|
||||
$form->dom->assignToAdmin->click();
|
||||
$form->wait(1);
|
||||
$form->wait(3);
|
||||
|
||||
/* 因为指派给字段被遮挡,所以需要滚动到可见区域 */
|
||||
$form->dom->firstAssignTo->scrollToElement();
|
||||
|
||||
@@ -132,6 +132,7 @@ $team->gen(6);
|
||||
|
||||
$tester = new storyTester();
|
||||
$tester->login();
|
||||
$tester->open();
|
||||
|
||||
/* 标签统计 */
|
||||
r($tester->checkTab('allTab', '15')) && p('status,message') && e('SUCCESS,allTab下显示条数正确'); //检查全部标签下显示条数
|
||||
|
||||
@@ -23,7 +23,7 @@ class closeTaskTester extends tester
|
||||
$form->dom->closeBtn->click();
|
||||
$form->wait(1);
|
||||
$form->dom->submitBtn->click();
|
||||
$form->wait(1);
|
||||
$form->wait(2);
|
||||
if($form->dom->taskStatus->getText() != $this->lang->task->statusList->closed) return $this->failed('关闭任务后状态错误');
|
||||
return $this->success('关闭任务成功');
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ class browseTester extends tester
|
||||
$form->wait(1);
|
||||
if($form->dom->modalText->getText() != $this->lang->tree->confirmDelete) return $this->failed('删除模块提示信息错误');
|
||||
$form->dom->modalConfirm->click();
|
||||
$form->wait(1);
|
||||
$form->wait(2);
|
||||
|
||||
if($form->dom->lastChildModule->getText() == $moduleName) return $this->failed('删除模块失败');
|
||||
return $this->success('删除模块成功');
|
||||
|
||||
@@ -5,6 +5,53 @@
|
||||
title=维护产品模块
|
||||
timeout=0
|
||||
cid=1
|
||||
|
||||
- 执行tester模块的createModule方法,参数是' '▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @创建模块时模块名包含空格,提示正确
|
||||
- 执行tester模块的createModule方法,参数是'模块1'▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @创建模块成功
|
||||
- 执行tester模块的createModule方法,参数是'模块1', true▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @创建模块时模块已存在,提示正确
|
||||
- 执行tester模块的createModule方法,参数是'模块2'▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @创建模块成功
|
||||
- 执行tester模块的createChildModule方法,参数是' '▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @创建子模块时子模块名包含空格,提示正确
|
||||
- 执行tester模块的createChildModule方法,参数是'子模块1'▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @创建子模块成功
|
||||
- 执行tester模块的createChildModule方法,参数是'模块2'▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @创建子模块成功
|
||||
- 执行tester模块的createChildModule方法,参数是'子模块1', true▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @创建子模块时子模块已存在,提示正确
|
||||
- 执行tester模块的editModule方法,参数是''▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @编辑模块时模块为空,提示正确
|
||||
- 执行tester模块的editModule方法,参数是' '▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @编辑模块时模块为空,提示正确
|
||||
- 执行tester模块的editModule方法,参数是'模块2'▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @编辑模块时模块已存在,提示正确
|
||||
- 执行tester模块的editModule方法,参数是'编辑模块1'▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @编辑模块成功
|
||||
- 执行tester模块的copyModule方法,参数是array▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @复制模块时所选产品下没有模块,提示正确
|
||||
- 执行tester模块的copyModule方法,参数是array▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @复制模块成功
|
||||
- 执行tester模块的deleteModule方法▫
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 测试结果 @删除模块成功
|
||||
|
||||
*/
|
||||
|
||||
chdir(__DIR__);
|
||||
|
||||
Reference in New Issue
Block a user