diff --git a/module/project/test/lib/createprojectlite.ui.class.php b/module/project/test/lib/createprojectlite.ui.class.php index cecf083d75..eb462b9856 100644 --- a/module/project/test/lib/createprojectlite.ui.class.php +++ b/module/project/test/lib/createprojectlite.ui.class.php @@ -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('创建项目成功'); + } + } }