* [refac] delete unused code.
This commit is contained in:
@@ -56,39 +56,4 @@ class linkStoryTester extends tester
|
||||
$viewPage = $this->initForm('productplan', 'view', $planID, 'appIframe-product');
|
||||
return ($viewPage->dom->checkInfoStory === false) ? $this->success('移除全部需求成功') : $this->failed('移除全部需求失败');
|
||||
}
|
||||
/**
|
||||
* 移除单个需求
|
||||
* unlink story
|
||||
*
|
||||
* @param $planID
|
||||
* @return mixed
|
||||
*/
|
||||
public function unLinkStory($planID)
|
||||
{
|
||||
$form = $this->initForm('productplan', 'view', $planID, 'appIframe-product');
|
||||
$linkNum = (int) explode(' ', $form->dom->linkNum->getText())[1];//计划当前关联的需求数
|
||||
$form->dom->unlinkFirBtn->click();//移除第一个需求
|
||||
$form->wait(1);
|
||||
$form->dom->confirm->click();//弹窗中点确认
|
||||
$form->wait(1);
|
||||
$viewPage = $this->initForm('productplan', 'view', $planID, 'appIframe-product');
|
||||
$linkNumAfter = (int) explode(' ', $viewPage->dom->linkNum->getText())[1];//计划移除需求后,关联的需求数
|
||||
return ($linkNum -1 == $linkNumAfter) ? $this->success('移除单个需求成功') : $this->failed('移除单个需求失败');
|
||||
}
|
||||
/**
|
||||
* 移除全部需求
|
||||
* unlink allstory
|
||||
*
|
||||
* @param $planID
|
||||
* @return mixed
|
||||
*/
|
||||
public function unLinkAllStory($planID)
|
||||
{
|
||||
$form = $this->initForm('productplan', 'view', $planID, 'appIframe-product');
|
||||
$form->wait(1);
|
||||
$form->dom->selectAllLink->click();//全选需求
|
||||
$form->dom->btn($this->lang->productplan->unlinkStoryAB)->click();//点击移除
|
||||
$viewPage = $this->initForm('productplan', 'view', $planID, 'appIframe-product');
|
||||
return ($viewPage->dom->checkInfo === false) ? $this->success('移除全部需求成功') : $this->failed('移除全部需求失败');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1098,54 +1098,6 @@ class testtaskModel extends model
|
||||
return array($runs, $scenes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用例以及场景数据。
|
||||
* Get cases with scenes data.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param array $runs
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getSceneCases($productID, $runs)
|
||||
{
|
||||
$scenes = $this->dao->select('*')->from(TABLE_SCENE)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('product')->eq($productID)
|
||||
->orderBy('grade_desc, sort_asc')
|
||||
->fetchAll('id');
|
||||
|
||||
$displayScenes = array();
|
||||
foreach($runs as $run)
|
||||
{
|
||||
if(!empty($run->scene)) $displayScenes[] = $run->scene;
|
||||
$run->parent = !empty($run->scene) ? 'scene-' . $scenes[$run->scene]->id : 0;
|
||||
$run->isScene = false;
|
||||
}
|
||||
|
||||
foreach($scenes as $scene)
|
||||
{
|
||||
foreach($displayScenes as $displayScene)
|
||||
{
|
||||
if(str_contains($scene->path, $displayScene . ','))
|
||||
{
|
||||
$displayScenes += explode(',', trim($scene->path, ','));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$displayScenes = array_unique($displayScenes);
|
||||
foreach($scenes as $id => $scene)
|
||||
{
|
||||
if(!in_array($id, $displayScenes)) unset($scenes[$id]);
|
||||
$scene->parent = !empty($scene->parent) ? 'scene-' . $scene->parent : 0;
|
||||
$scene->id = 'scene-' . $scene->id;
|
||||
$scene->isScene = true;
|
||||
}
|
||||
|
||||
return array($runs, $scenes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个测试单关联的用例。
|
||||
* Get cases associated with a testtask.
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
global $lang;
|
||||
|
||||
$manageAccount = new stdClass();
|
||||
$manageAccount->name = 'manageAccount';
|
||||
$manageAccount->title = '账号管理';
|
||||
$manageAccount->icon = 'cog-outline text-primary';
|
||||
$manageAccount->type = 'starter';
|
||||
$manageAccount->modules = 'admin,company,dept';
|
||||
$manageAccount->app = 'admin';
|
||||
$manageAccount->tasks = array();
|
||||
|
||||
$manageAccount->tasks['manageDepts'] = array();
|
||||
$manageAccount->tasks['manageDepts']['name'] = 'manageDepts';
|
||||
$manageAccount->tasks['manageDepts']['title'] = '部门维护';
|
||||
$manageAccount->tasks['manageDepts']['steps'] = array();
|
||||
$manageAccount->tasks['manageDepts']['steps'][] = array('type' => 'openApp', 'app' => 'admin', 'title' => '点击后台', 'desc' => '您可以在这里维护管理账号,进行各类配置项的设置 。');
|
||||
$manageAccount->tasks['manageDepts']['steps'][] = array('type' => 'click', 'page' => 'admin-index', 'target' => '#settings .setting-box[data-id="company"]', 'title' => '点击人员管理', 'desc' => '您可以在这里维护部门、添加人员和分组配置权限。');
|
||||
$manageAccount->tasks['manageDepts']['steps'][] = array('type' => 'clickNavbar', 'page' => 'company-browse', 'target' => 'dept', 'title' => '点击部门', 'desc' => '您可以在这里进行部门维护。');
|
||||
$manageAccount->tasks['manageDepts']['steps'][] = array('type' => 'form', 'page' => 'dept-browse', 'target' => '#mainContentCell', 'title' => '填写部门信息', 'desc' => '可以修改和新加部门,点击左侧部门树切换要修改的部门。');
|
||||
$manageAccount->tasks['manageDepts']['steps'][] = array('type' => 'saveForm', 'page' => 'dept-browse', 'target' => '#mainContentCell', 'title' => '点击保存', 'desc' => '保存后可以在左侧目录中看到。');
|
||||
|
||||
$manageAccount->tasks['addUser'] = array();
|
||||
$manageAccount->tasks['addUser']['name'] = 'addUser';
|
||||
$manageAccount->tasks['addUser']['title'] = '添加人员';
|
||||
$manageAccount->tasks['addUser']['startUrl'] = array('dept', 'browse');
|
||||
$manageAccount->tasks['addUser']['steps'] = array();
|
||||
$manageAccount->tasks['addUser']['steps'][] = array('type' => 'clickNavbar', 'page' => 'dept-browse', 'target' => 'browseUser', 'title' => '点击用户', 'desc' => '你可以在这里添加公司人员。');
|
||||
$manageAccount->tasks['addUser']['steps'][] = array('type' => 'click', 'page' => 'company-browse', 'target' => '#actionBar .create-user-btn', 'title' => '点击添加人员', 'desc' => '你可以在这里添加公司人员。');
|
||||
$manageAccount->tasks['addUser']['steps'][] = array('type' => 'form', 'page' => 'user-create', 'title' => '输入人员信息', 'desc' => '请输入必填项');
|
||||
$manageAccount->tasks['addUser']['steps'][] = array('type' => 'saveForm', 'page' => 'user-create', 'title' => '保存人员信息', 'desc' => '保存后可以在人员列表中查看。');
|
||||
|
||||
$config->tutorial->guides = array();
|
||||
$config->tutorial->guides[$manageAccount->name] = $manageAccount;
|
||||
|
||||
if($config->systemMode == 'light') unset($config->tutorial->guides[$managePrograms->name]);
|
||||
@@ -12,21 +12,6 @@ declare(strict_types=1);
|
||||
*/
|
||||
class tutorialModel extends model
|
||||
{
|
||||
/**
|
||||
* 获取当前所在的教程和任务。
|
||||
* Get guide and task.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function getGuideTaskName()
|
||||
{
|
||||
if(empty($_SERVER['HTTP_X_ZIN_TUTORIAL'])) return array('guide' => '', 'guideTask' => '');
|
||||
|
||||
list($guide, $guideTask, $guideStepIndex) = explode('-', $_SERVER['HTTP_X_ZIN_TUTORIAL']);
|
||||
return array('guide' => $guide, 'guideTask' => $guideTask);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查新手模式配置。
|
||||
* Check novice mode config.
|
||||
|
||||
Reference in New Issue
Block a user