*[task#127578,done,2h] Add ui test files of edit a doc

This commit is contained in:
sunxiaoqi
2024-09-06 09:10:41 +08:00
committed by 李阳
parent 88e57aa0ba
commit 75f226e1f0
2 changed files with 41 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
include dirname(__FILE__, 5) . '/test/lib/ui.php';
class createDocTester extends tester
{
/**
* 编辑文档。
* Edit a draft.
*
* @param string $editDocName
* @access public
* @return void
*/
public function editDoc($docName, $editDocName)
{
/*进入我的空间下创建文档*/
$this->openUrl('doc', 'myspace', array('objectType' => 'mine'));
$form = $this->loadPage('doc', 'myspace', array('objectType' => 'mine'));
$form->dom->createDocBtn->click();
$form->wait(1);
$form->dom->showTitle->setValue($docName->dcName);
$form->dom->saveBtn->click();
$form->wait(1);
$form->dom->releaseBtn->click();
}
}
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env php
<?php
chdir(__DIR__);
include '../lib/editdoc.ui.class.php';
$tester = new createDocTester();
$tester->login();
$docName = new stdClass();
$docName->dcName = '文档1';
$editDocName = new stdClass();
$editDocName->editName = '编辑文档1';
r($tester->editDoc($editDocName)) && p('message,status') && e('编辑文档表单页提示信息正确,SUCCESS');