*[task#144987,doing,1h,1h] Fix bug.
This commit is contained in:
@@ -94,7 +94,7 @@ class browseTester extends tester
|
||||
$form->dom->editSubmitBtn->click();
|
||||
$form->wait(1);
|
||||
|
||||
if(empty($newName))
|
||||
if(empty($newName) || ctype_space($newName))
|
||||
{
|
||||
if($form->dom->nameTip->getText() == sprintf($this->lang->error->notempty, $this->lang->tree->name)) return $this->success('编辑模块时模块为空,提示正确');
|
||||
return $this->failed('编辑模块时模块为空,提示错误');
|
||||
@@ -104,12 +104,6 @@ class browseTester extends tester
|
||||
if($form->dom->nameTip->getText() == sprintf($this->lang->tree->repeatName, $newName)) return $this->success('编辑模块时模块已存在,提示正确');
|
||||
return $this->failed('编辑模块时模块已存在,提示错误');
|
||||
}
|
||||
if(ctype_space($newName))
|
||||
{
|
||||
if(!is_object($form->dom->modalText)) return $this->failed('编辑模块时模块名包含空格,没有提示');
|
||||
if($form->dom->modalText->getText() == $this->lang->tree->shouldNotBlank) return $this->success('编辑模块时模块名包含空格,提示正确');
|
||||
return $this->failed('编辑模块时模块名包含空格,提示错误');
|
||||
}
|
||||
if($form->dom->firstModule->getText() == $newName) return $this->success('编辑模块成功');
|
||||
return $this->failed('编辑模块失败');
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class browsetaskTester extends tester
|
||||
if($checkRepeat) $moduleName = preg_replace('/\[.*]/', '', $form->dom->firstModule->getText());
|
||||
$form->dom->firsrNullModule->setValue($moduleName);
|
||||
$form->dom->submitBtn->click();
|
||||
$form->wait(1);
|
||||
$form->wait(3);
|
||||
|
||||
if($checkRepeat)
|
||||
{
|
||||
@@ -93,7 +93,7 @@ class browsetaskTester extends tester
|
||||
$form->dom->editSubmitBtn->click();
|
||||
$form->wait(1);
|
||||
|
||||
if(empty($newName))
|
||||
if(empty($newName) || ctype_space($newName))
|
||||
{
|
||||
if($form->dom->nameTip->getText() == sprintf($this->lang->error->notempty, $this->lang->tree->name)) return $this->success('编辑模块时模块为空,提示正确');
|
||||
return $this->failed('编辑模块时模块为空,提示错误');
|
||||
@@ -103,12 +103,6 @@ class browsetaskTester extends tester
|
||||
if($form->dom->nameTip->getText() == sprintf($this->lang->tree->repeatName, $newName)) return $this->success('编辑模块时模块已存在,提示正确');
|
||||
return $this->failed('编辑模块时模块已存在,提示错误');
|
||||
}
|
||||
if(ctype_space($newName))
|
||||
{
|
||||
if(!is_object($form->dom->modalText)) return $this->failed('编辑模块时模块名包含空格,没有提示');
|
||||
if($form->dom->modalText->getText() == $this->lang->tree->shouldNotBlank) return $this->success('编辑模块时模块名包含空格,提示正确');
|
||||
return $this->failed('编辑模块时模块名包含空格,提示错误');
|
||||
}
|
||||
if(preg_replace('/\[.*]/', '', $form->dom->firstModule->getText()) == $newName) return $this->success('编辑模块成功');
|
||||
return $this->failed('编辑模块失败');
|
||||
}
|
||||
|
||||
@@ -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(' ')) && 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,编辑模块成功');
|
||||
|
||||
|
||||
@@ -54,7 +54,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(' ')) && 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,编辑模块成功');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user