*[task#127573,done,0.5h,0h] modify dom name of linkstory
This commit is contained in:
@@ -14,10 +14,10 @@ class linkStoryTester extends tester
|
||||
$form = $this->initForm('productplan', 'view', $planID, 'appIframe-product');
|
||||
$form->dom->btn($this->lang->productplan->linkStory)->click();//点击关联需求按钮
|
||||
$form->wait(1);
|
||||
$form->dom->selectAll->click();//全选需求
|
||||
$form->dom->selectAllStory->click();//全选需求
|
||||
$form->dom->btn($this->lang->productplan->linkStory)->click();//点击关联需求
|
||||
$viewPage = $this->initForm('productplan', 'view', $planID, 'appIframe-product');
|
||||
return ($viewPage->dom->checkInfo === false) ? $this->failed('关联需求失败') : $this->success('关联需求成功');
|
||||
return ($viewPage->dom->checkInfoStory === false) ? $this->failed('关联需求失败') : $this->success('关联需求成功');
|
||||
}
|
||||
/**
|
||||
* 移除单个需求
|
||||
@@ -29,13 +29,13 @@ class linkStoryTester extends tester
|
||||
public function unLinkStory($planID)
|
||||
{
|
||||
$form = $this->initForm('productplan', 'view', $planID, 'appIframe-product');
|
||||
$linkNum = (int) explode(' ', $form->dom->linkNum->getText())[1];//计划当前关联的需求数
|
||||
$form->dom->unlinkFirBtn->click();//移除第一个需求
|
||||
$linkNum = (int) explode(' ', $form->dom->storyLinkNum->getText())[1];//计划当前关联的需求数
|
||||
$form->dom->unlinkFirStory->click();//移除第一个需求
|
||||
$form->wait(1);
|
||||
$form->dom->confirm->click();//弹窗中点确认
|
||||
$form->wait(1);
|
||||
$viewPage = $this->initForm('productplan', 'view', $planID, 'appIframe-product');
|
||||
$linkNumAfter = (int) explode(' ', $viewPage->dom->linkNum->getText())[1];//计划移除需求后,关联的需求数
|
||||
$linkNumAfter = (int) explode(' ', $viewPage->dom->storyLinkNum->getText())[1];//计划移除需求后,关联的需求数
|
||||
return ($linkNum -1 == $linkNumAfter) ? $this->success('移除单个需求成功') : $this->failed('移除单个需求失败');
|
||||
}
|
||||
/**
|
||||
@@ -49,9 +49,9 @@ class linkStoryTester extends tester
|
||||
{
|
||||
$form = $this->initForm('productplan', 'view', $planID, 'appIframe-product');
|
||||
$form->wait(1);
|
||||
$form->dom->selectAllLink->click();//全选需求
|
||||
$form->dom->allLinkedStory->click();//全选需求
|
||||
$form->dom->btn($this->lang->productplan->unlinkStoryAB)->click();//点击移除
|
||||
$viewPage = $this->initForm('productplan', 'view', $planID, 'appIframe-product');
|
||||
return ($viewPage->dom->checkInfo === false) ? $this->success('移除全部需求成功') : $this->failed('移除全部需求失败');
|
||||
return ($viewPage->dom->checkInfoStory === false) ? $this->success('移除全部需求成功') : $this->failed('移除全部需求失败');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,18 +5,23 @@ class viewPage extends page
|
||||
{
|
||||
parent::__construct($webdriver);
|
||||
$xpath = array(
|
||||
'planTitle' => "//*[@id='planInfo']/table/tbody/tr[1]/td",
|
||||
'delTag' => "//*[@id='mainContent']/div[1]/div/span[2]",
|
||||
'confirm' => "//button[@z-key='confirm']",
|
||||
'status' => "//*[@id='planInfo']/table/tbody/tr[last()-1]/td",
|
||||
'begin' => "//*[@id='planInfo']/table/tbody/tr[2]/td",
|
||||
'end' => "//*[@id='planInfo']/table/tbody/tr[3]/td",
|
||||
'parent' => "//*[@id='planInfo']/table/tbody/tr[2]/td/a",
|
||||
'selectAll' => "//*[@id='unlinkStoryList']/div[1]/div[1]/div/div[1]/div/div/label",
|
||||
'checkInfo' => "//*[@id='storyDTable']/div[3]/div[2]",
|
||||
'selectAllLink' => "//*[@id='storyDTable']/div[1]/div[1]/div/div[1]/div/div/label",
|
||||
'unlinkFirBtn' => "//*[@id='storyDTable']/div[2]/div[3]/div/div[1]/div/nav/a",
|
||||
'linkNum' => "//*[@id='storyDTable']/div[3]/nav/div[1]",
|
||||
'planTitle' => "//*[@id='planInfo']/table/tbody/tr[1]/td",
|
||||
'delTag' => "//*[@id='mainContent']/div[1]/div/span[2]",
|
||||
'confirm' => "//button[@z-key='confirm']",
|
||||
'status' => "//*[@id='planInfo']/table/tbody/tr[last()-1]/td",
|
||||
'begin' => "//*[@id='planInfo']/table/tbody/tr[2]/td",
|
||||
'end' => "//*[@id='planInfo']/table/tbody/tr[3]/td",
|
||||
'parent' => "//*[@id='planInfo']/table/tbody/tr[2]/td/a",
|
||||
'selectAllStory' => "//*[@id='unlinkStoryList']/div[1]/div[1]/div/div[1]/div/div/label",
|
||||
'selectAllBug' => "//*[@id='unlinkBugList']/div[1]/div[1]/div/div[1]/div/div/label",
|
||||
'checkInfoStory' => "//*[@id='storyDTable']/div[3]/div[2]",
|
||||
'checkInfoBug' => "//*[@id='bugDTable']/div[3]/div[2]",
|
||||
'allLinkedStory' => "//*[@id='storyDTable']/div[1]/div[1]/div/div[1]/div/div/label",
|
||||
'allLinkedBug' => "//*[@id='bugDTable']/div[1]/div[1]/div/div[1]/div/div/label",
|
||||
'unlinkFirStory' => "//*[@id='storyDTable']/div[2]/div[3]/div/div[1]/div/nav/a",
|
||||
'unlikFirBug' => "//*[@id='bugDTable']/div[2]/div[3]/div/div[1]/div/nav/a",
|
||||
'storyLinkNum' => "//*[@id='storyDTable']/div[3]/nav/div[1]",
|
||||
'bugLinkNum' => "//*[@id='bugDTable']/div[3]/nav/div[1]",
|
||||
);
|
||||
$this->dom->xpath = array_merge($this->dom->xpath, $xpath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user