[task#126577] add closestory.ui.class.php file.

This commit is contained in:
lijie
2024-08-28 10:37:26 +08:00
committed by 李阳
parent fa0801fed9
commit ea3e6ae031
@@ -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('关闭需求成功');
}
}