*[task#127578,done,2h] Add ui test files of edit a doc
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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');
|
||||
Reference in New Issue
Block a user