+ [task#142429,done,0.6h] Add comment and checkresult function of createprojectlite file.
This commit is contained in:
@@ -38,4 +38,27 @@ class createProjectLiteTester extends tester
|
||||
if(!is_object($form->dom->tip))
|
||||
{
|
||||
if($this->checkformtips('project')) return $this->success('创建项目表单页提示信息正确');
|
||||
if($form->dom->endtip)
|
||||
{
|
||||
/* 检查结束日期不能为空 */
|
||||
$endtiptext = $form->dom->endtip->gettext();
|
||||
$endtip = sprintf($this->lang->copyproject->endtip,'');
|
||||
return ($endtiptext == $endtip) ? $this->success('创建项目表单页提示信息正确') : $this->failed('创建项目表单页提示信息不正确');
|
||||
form->wait(1);
|
||||
}
|
||||
return $this->failed('创建项目表单页提示信息不正确');
|
||||
}
|
||||
/* 检查创建成功后的提示信息 */
|
||||
if(is_object($form->dom->tip))
|
||||
{
|
||||
/* 跳转到项目列表页面,按照项目名称进行搜索 */
|
||||
$browsepage = $this->initform('project', 'browse');
|
||||
$browsepage->dom->search($searchlist = array("项目名称,包含, {$project['name']}"));
|
||||
$browsepage->wait(2);
|
||||
|
||||
/* 断言检查名称是否正确 */
|
||||
if($browsepage->dom->projectnamelite->gettext() != $project['name']) return $this->failed('名称错误');
|
||||
return $this->success('创建项目成功');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user