diff --git a/module/execution/test/lib/createexecution.ui.class.php b/module/execution/test/lib/createexecution.ui.class.php index e7fa74f546..c785eca651 100755 --- a/module/execution/test/lib/createexecution.ui.class.php +++ b/module/execution/test/lib/createexecution.ui.class.php @@ -111,29 +111,18 @@ class createExecutionTester extends tester { $this->inputFields($execution); + /* 从url中获取executionID */ + $url = explode('executionID=', $this->response('url')); /* 根据url中是否包含executionID,判断是否创建成功 */ - if(strpos($this->response('url'), 'executionID') == false) + if(!isset($url[1])) { if($this->checkFormTips('execution')) return $this->success('创建执行表单页提示信息正确'); return $this->failed('创建执行表单页提示信息不正确'); } /* 跳转至概况页 */ - if($type == 'kanban') - { - $kanbanPage = $this->loadPage('execution', 'kanban'); - $kanbanPage->wait(1); - $kanbanPage->dom->btn($this->lang->settings)->click(); - } - else - { - $form = $this->loadPage(); - $form->dom->btn($this->lang->execution->setTeam)->click(); - $form->dom->btn($this->lang->settings)->click(); - } + $viewPage = $this->initForm('execution', 'view', array('executionID' => $url[1]), 'appIframe-execution'); - /* 查看相关内容是否正确 */ - $viewPage = $this->loadPage('execution', 'view'); - $viewPage->wait(1); + /* 校验执行信息 */ if($viewPage->dom->executionName->getText() != $execution['name']) return $this->failed('执行名称错误'); if($viewPage->dom->status->getText() != $this->lang->execution->statusList->wait) return $this->failed('执行状态错误'); if($viewPage->dom->acl->getText() != $this->lang->execution->kanbanAclList->open) return $this->failed('执行权限错误');