*[task#144987,doing,0.5h,1h] Add waittime.

This commit is contained in:
yulujie
2025-06-12 14:34:37 +08:00
committed by 李阳
parent 7615474a7a
commit f9d4f348b3
3 changed files with 14 additions and 6 deletions
+4 -3
View File
@@ -14,7 +14,7 @@ class browseTester extends tester
public function createModule($moduleName, $checkRepeat = false)
{
$form = $this->initForm('tree', 'browse', array('product' => '1', 'view' => 'story'), 'appIframe-product');
$form->wait(1);
$form->dom->waitElement($form->dom->xpath['firsrNullModule'], 10);
if($checkRepeat) $moduleName = $form->dom->firstModule->getText();
$form->dom->firsrNullModule->setValue($moduleName);
$form->dom->submitBtn->click();
@@ -86,7 +86,7 @@ class browseTester extends tester
public function editModule($newName)
{
$form = $this->initForm('tree', 'browse', array('product' => '1', 'view' => 'story'), 'appIframe-product');
$form->wait(1);
$form->dom->waitElement($form->dom->xpath['firstEditBtn'], 10);
$form->dom->firstEditBtn->click();
$form->wait(1);
$form->dom->name->setValue($newName);
@@ -152,6 +152,7 @@ class browseTester extends tester
$form = $this->initForm('tree', 'browse', array('product' => '3', 'view' => 'story'), 'appIframe-product');
$form->wait(1);
$form->dom->btn($this->lang->tree->syncFromProduct)->click();
$form->wait(1);
$form->dom->allProduct->picker($product[0]);
$form->dom->copyIcon->click();
$form->wait(1);
@@ -164,7 +165,7 @@ class browseTester extends tester
}
$form->dom->submitBtn->click();
$form->wait(1);
$form->dom->waitElement($form->dom->xpath['firstModule'], 10);
if($form->dom->firstModule->getText() == $product[1] && $form->dom->lastModule->getText() == $product[2]) return $this->success('复制模块成功');
return $this->failed('复制模块失败');
}
@@ -14,12 +14,19 @@ class viewhistoryTester extends tester
public function checkHistory($param, $action)
{
$form = $this->initForm('tree', 'browse', array('product' => '1', 'view' => 'story'), 'appIframe-product');
$form->wait(1);
$form->dom->btn($this->lang->history)->click();
$form->wait();
$content = explode(" ", $form->dom->{$param}->getText());
$history = $this->lang->module->action->{$action}->main;
if($action == 'edited') $history = $this->lang->action->desc->{$action};
if($action == 'edited')
{
$history = $this->lang->action->desc->{$action};
}
else
{
$history = $this->lang->module->action->{$action}->main;
}
$history = explode(" ", $history);
if(trim($history[3]) == $content[4]) return $this->success('历史记录正确');
+1 -1
View File
@@ -50,7 +50,7 @@ r($tester->createChildModule('模块2')) && p('status,message') && e('SU
r($tester->createChildModule('子模块1', true)) && p('status,message') && e('SUCCESS,创建子模块时子模块已存在,提示正确');
r($tester->editModule('')) && p('status,message') && e('SUCCESS,编辑模块时模块为空,提示正确');
r($tester->editModule('模块 2')) && p('status,message') && e('SUCCESS,编辑模块时模块名包含空格,提示正确');
r($tester->editModule(' ')) && p('status,message') && e('SUCCESS,编辑模块时模块名包含空格,提示正确');
r($tester->editModule('模块2')) && p('status,message') && e('SUCCESS,编辑模块时模块已存在,提示正确');
r($tester->editModule('编辑模块1')) && p('status,message') && e('SUCCESS,编辑模块成功');