From 2c0a59798f6351768393d9ecd84da3f2aba61bf9 Mon Sep 17 00:00:00 2001 From: lijie Date: Thu, 10 Jul 2025 10:29:02 +0800 Subject: [PATCH] [task#146147, 2h] check ui-case for failed. --- module/story/test/lib/changestoryinlite.ui.class.php | 5 ++++- module/story/test/ui/changestoryinlite.php | 8 ++++++++ module/story/test/ui/creatstoryinlite.php | 4 ++-- test/lib/webdriver/webdriver.class.php | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/module/story/test/lib/changestoryinlite.ui.class.php b/module/story/test/lib/changestoryinlite.ui.class.php index 051786d5de..cc191a94eb 100755 --- a/module/story/test/lib/changestoryinlite.ui.class.php +++ b/module/story/test/lib/changestoryinlite.ui.class.php @@ -25,7 +25,10 @@ class changeStoryInLiteTester extends tester $form = $this->initForm('projectstory', 'story', array('projectID' => '1'), 'appIframe-project'); //变更目标前需要进入列表页面,获取项目ID $form = $this->initForm('story', 'change', array('storyID' => '1', 'from' => 'project'), 'appIframe-project'); $form->dom->title->setValue($storyName); - $form->dom->{'reviewer[]'}->multiPicker($reviewer); + if($reviewer != null) + { + $form->dom->{'reviewer[]'}->multiPicker($reviewer); + } $form->dom->btn($this->lang->save)->click(); $form->wait(3); diff --git a/module/story/test/ui/changestoryinlite.php b/module/story/test/ui/changestoryinlite.php index d630bdee31..ad2724b8cc 100755 --- a/module/story/test/ui/changestoryinlite.php +++ b/module/story/test/ui/changestoryinlite.php @@ -87,6 +87,14 @@ $projectstory->version->range('1'); $projectstory->order->range('1'); $projectstory->gen(1); +$team = zenData('team'); +$team->id->range('1'); +$team->root->range('1'); +$team->type->range('project'); +$team->account->range('admin'); +$team->limited->range('no'); +$team->gen(1); + $tester = new changeStoryInLiteTester(); $tester->login(); diff --git a/module/story/test/ui/creatstoryinlite.php b/module/story/test/ui/creatstoryinlite.php index e016207897..0d01831c89 100755 --- a/module/story/test/ui/creatstoryinlite.php +++ b/module/story/test/ui/creatstoryinlite.php @@ -73,8 +73,8 @@ $reviewers = array( 'admin' => array('admin') ); -#r($tester->createDefault($storys['null'], $reviewers['admin'])) && p('message,status') && e('创建目标页面名称为空提示正确,SUCCESS'); // 缺少名称,创建失败 +r($tester->createDefault($storys['null'], $reviewers['admin'])) && p('message,status') && e('创建目标页面名称为空提示正确,SUCCESS'); // 缺少名称,创建失败 r($tester->createDefault($storys['story'], $reviewers['null'])) && p('message,status') && e('创建目标页面评审人为空提示正确,SUCCESS'); // 缺少评审人,创建失败 -#r($tester->createDefault($storys['story'], $reviewers['admin'])) && p('message,status') && e('创建运营界面目标成功,SUCCESS'); // 创建成功 +r($tester->createDefault($storys['story'], $reviewers['admin'])) && p('message,status') && e('创建运营界面目标成功,SUCCESS'); // 创建成功 $tester->closeBrowser(); diff --git a/test/lib/webdriver/webdriver.class.php b/test/lib/webdriver/webdriver.class.php index 0131968228..fa6e3137d1 100644 --- a/test/lib/webdriver/webdriver.class.php +++ b/test/lib/webdriver/webdriver.class.php @@ -1060,7 +1060,7 @@ class dom $pickerInput = $picker->findElement(WebDriverBy::xpath('//*[@class="picker-multi-selections"]//input')); $pickerInput->click(); $pickerInput->sendKeys(trim($value)); - sleep(1); + sleep(3); $this->driver->findElement(WebDriverBy::xpath("//*[@id='pick-pop-$pickerID']//span[@class='is-match-keys']"))->click(); $pickerInput->clear();