From 99979f29db4c84c240a528d5e641cea1f65dde2a Mon Sep 17 00:00:00 2001 From: lixiaoyu Date: Fri, 11 Jul 2025 10:15:09 +0800 Subject: [PATCH] modify uitest of batchcreateinlite --- module/projectstory/test/ui/page/story.php | 3 ++- module/story/test/lib/batchcreateinlite.ui.class.php | 9 +++------ module/story/test/ui/page/batchcreate.php | 5 +---- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/module/projectstory/test/ui/page/story.php b/module/projectstory/test/ui/page/story.php index 157eada956..5fe10e4e57 100755 --- a/module/projectstory/test/ui/page/story.php +++ b/module/projectstory/test/ui/page/story.php @@ -48,7 +48,8 @@ class storyPage extends page 'openTabNum' => '//*[@data-id="unclosed"]/span[2]', 'draftTabNum' => '//*[@data-id="draft"]/span[2]', 'reviewingTabNum' => '//*[@data-id="reviewing"]/span[2]', - 'changingTabNum' =>'//*[@data-id="changing"]/span[2]' + 'changingTabNum' => '//*[@data-id="changing"]/span[2]', + 'firstStory' => '//*[@id="stories"]/div[2]/div[1]/div/div[2]/div/a' ); $this->dom->xpath = array_merge($this->dom->xpath, $xpath); } diff --git a/module/story/test/lib/batchcreateinlite.ui.class.php b/module/story/test/lib/batchcreateinlite.ui.class.php index d79ab068c8..50f2ce0a96 100755 --- a/module/story/test/lib/batchcreateinlite.ui.class.php +++ b/module/story/test/lib/batchcreateinlite.ui.class.php @@ -60,12 +60,9 @@ class batchCreateStory extends tester } else { - $form->dom->searchBtn->click(); - $form->wait(1); - $form->dom->value1->setValue($story->name); - $form->dom->searchButton->click(); - $form->wait(2); - return ($form->dom->firstStory->getText() == $story->name) + $storyList = $this->initForm('projectstory', 'story', $project, 'appIframe-project'); + $storyList->dom->search(array("{$this->lang->story->name},=,{$story->name}")); + return ($storyList->dom->firstStory->getText() == $story->name) ? $this->success('批量创建目标成功') : $this->failed('批量创建目标失败'); } diff --git a/module/story/test/ui/page/batchcreate.php b/module/story/test/ui/page/batchcreate.php index 8fb3521713..f9f99b4541 100755 --- a/module/story/test/ui/page/batchcreate.php +++ b/module/story/test/ui/page/batchcreate.php @@ -13,10 +13,7 @@ class batchCreatePage extends page 'epicSave' => "//*[@id='zin_epic_batchcreate_formBatch']/div[2]/button[1]", /*运营管理界面*/ 'reviewerPick' => "/html/body/div[1]/div/div/div/div[2]/form/div[1]/table/tbody/tr[1]/td[10]/div/div/select", - 'reviewerTip' => "//*[@id='reviewer[1][]Tip']", - 'firstStory' => "//*[@id='stories']/div[2]/div[1]/div/div[2]/div/a", - 'searchBtn' => "//*[@id='featureBar']/menu/li[7]/button", - 'searchButton' => "//*[@id='mainContentCell']/div[1]/div/form/div[2]/button[1]" + 'reviewerTip' => "//*[@id='reviewer[1][]Tip']" ); $this->dom->xpath = array_merge($this->dom->xpath, $xpath); }