[task#126577] add closestory.ui.class.php file.
This commit is contained in:
@@ -17,4 +17,24 @@ class closeStoryTester extends tester
|
||||
* @param string closeReason
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function closeStory($storyID, $closeReason)
|
||||
{
|
||||
$form = $this->openURL('story', 'view', array('id' => $storyID), 'appIframe-product'); //进入研发需求详情页
|
||||
$form = $this->loadPage('story', 'view');
|
||||
$form->dom->btn($this->lang->story->close)->click(); //点击关闭需求按钮
|
||||
|
||||
$form->wait(1);
|
||||
|
||||
$form->dom->closedReason->picker($closeReason); //选择关闭原因
|
||||
$form->dom->getElement("//*[@id='zin_story_close_{$storyID}_form']/div[4]/div/button")->click();
|
||||
$form->wait(1);
|
||||
|
||||
$viewPage = $this->loadPage('story', 'view');
|
||||
if($viewPage->dom->status->getText() != '已关闭') return $this->failed('需求状态不正确');
|
||||
$viewPage->dom->btn($this->lang->story->legendLifeTime)->click();
|
||||
if($viewPage->dom->closeReason->getText() != $closeReason) return $this->failed('需求关闭原因不正确');
|
||||
|
||||
return $this->success('关闭需求成功');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user