From 19af348c3ccbe3e2c20738197ebffa70b8901272 Mon Sep 17 00:00:00 2001 From: liyang <“liyang@easycorp.ltd”> Date: Thu, 7 Apr 2022 15:27:45 +0800 Subject: [PATCH] add case data --- test/data/projectcase.yaml | 17 ++++++++++++++++ test/data/suitecase.yaml | 33 +++++++++++++++++++++++++++++++ test/data/zentao/config.php | 2 ++ test/data/zentao/processor.php | 1 + test/data/zt_block.sql | 36 ++++++++++++++++++++++++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 test/data/projectcase.yaml create mode 100644 test/data/suitecase.yaml create mode 100644 test/data/zt_block.sql diff --git a/test/data/projectcase.yaml b/test/data/projectcase.yaml new file mode 100644 index 0000000000..237fb150be --- /dev/null +++ b/test/data/projectcase.yaml @@ -0,0 +1,17 @@ +title: table zt_projectcase +desc: "" +author: automated export +version: "1.0" +fields: + - field: project + range: 101-200{4} + - field: product + range: 1-100{4} + - field: case + range: 1-400 + - field: count + range: 1 + - field: version + range: 1 + - field: order + range: 1 diff --git a/test/data/suitecase.yaml b/test/data/suitecase.yaml new file mode 100644 index 0000000000..3a471ad5e8 --- /dev/null +++ b/test/data/suitecase.yaml @@ -0,0 +1,33 @@ +title: table zt_suitecase +desc: "" +author: automated export +version: "1.0" +fields: + - field: suite + note: "" + range: 1-200{2} + prefix: "" + postfix: "" + format: "" + - field: product + note: "" + range: 1-100{4} + prefix: "" + postfix: "" + format: "" + - field: case + note: "" + range: 1-400 + prefix: "" + postfix: "" + loop: 0 + loopfix: "" + format: "" + - field: version + note: "" + range: 1 + prefix: "" + postfix: "" + loop: 0 + loopfix: "" + format: "" diff --git a/test/data/zentao/config.php b/test/data/zentao/config.php index 74634d3ad7..d3f0f1f77b 100644 --- a/test/data/zentao/config.php +++ b/test/data/zentao/config.php @@ -44,6 +44,7 @@ $builder->testresult = array('rows' => 40, 'extends' => array('testresult')); $builder->testrun = array('rows' => 40, 'extends' => array('testrun')); $builder->testreport = array('rows' => 10, 'extends' => array('testreport')); $builder->testsuite = array('rows' => 201, 'extends' => array('testsuite')); +$builder->suitecase = array('rows' => 400, 'extends' => array('suitecase')); $builder->product = array('rows' => 100, 'extends' => array('product')); $builder->productalone = array('rows' => 20, 'extends' => array('product','productalone')); @@ -53,6 +54,7 @@ $builder->branch = array('rows' => 240, 'extends' => array('branch' $builder->projectproduct = array('rows' => 200, 'extends' => array('projectproduct')); $builder->projectproductalone = array('rows' => 28, 'extends' => array('projectproduct','projectproductalone')); $builder->projectstory = array('rows' => 200, 'extends' => array('projectstory')); +$builder->projectcase = array('rows' => 400, 'extends' => array('projectcase')); $builder->executionstory = array('rows' => 180, 'extends' => array('projectstory','executionstory')); $builder->kanbanspace = array('rows' => 50, 'extends' => array('kanbanspace')); diff --git a/test/data/zentao/processor.php b/test/data/zentao/processor.php index 68ca0b4476..187a559747 100644 --- a/test/data/zentao/processor.php +++ b/test/data/zentao/processor.php @@ -297,6 +297,7 @@ class Processor global $app; $sqlRoot = $app->getAppRoot(); $this->dao->exec(file_get_contents($sqlRoot . '/data/zt_config.sql')); + $this->dao->exec(file_get_contents($sqlRoot . '/data/zt_block.sql')); $this->dao->exec(file_get_contents($sqlRoot . '/data/zt_lang.sql')); $this->dao->exec(file_get_contents($sqlRoot . '/data/zt_cron.sql')); } diff --git a/test/data/zt_block.sql b/test/data/zt_block.sql new file mode 100644 index 0000000000..17e581eeab --- /dev/null +++ b/test/data/zt_block.sql @@ -0,0 +1,36 @@ +truncate `zt_block`; +INSERT INTO `zt_block` (`id`, `account`, `vision`, `module`, `type`, `title`, `source`, `block`, `params`, `order`, `grid`, `height`, `hidden`) VALUES +(102, 'admin', 'rnd', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 8, 8, 0, 0), +(101, 'admin', 'rnd', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 7, 8, 0, 0), +(100, 'admin', 'rnd', 'my', '', '我的贡献', '', 'contribute', '', 6, 4, 0, 0), +(97, 'admin', 'rnd', 'my', '', '流程图', '', 'flowchart', '', 3, 8, 0, 0), +(98, 'admin', 'rnd', 'my', '', '我的待办', 'todo', 'list', '{\"count\":\"20\"}', 4, 4, 0, 0), +(99, 'admin', 'rnd', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 5, 8, 0, 0), +(95, 'admin', 'rnd', 'my', '', '欢迎', '', 'welcome', '', 1, 8, 0, 0), +(96, 'admin', 'rnd', 'my', '', '最新动态', '', 'dynamic', '', 2, 4, 0, 0), +(41, 'admin', 'lite', 'my', '', '欢迎', '', 'welcome', '', 1, 8, 0, 0), +(42, 'admin', 'lite', 'my', '', '最新动态', '', 'dynamic', '', 2, 4, 0, 0), +(43, 'admin', 'lite', 'my', '', '流程图', '', 'flowchart', '', 3, 8, 0, 0), +(44, 'admin', 'lite', 'my', '', '我的待办', 'todo', 'list', '{\"count\":\"20\"}', 4, 4, 0, 0), +(45, 'admin', 'lite', 'my', '', '看板列表', 'execution', 'scrumlist', '{\"count\":\"15\",\"type\":\"doing\",\"orderBy\":\"id_desc\"}', 5, 8, 0, 0), +(46, 'admin', 'lite', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 7, 8, 0, 0), +(47, 'admin', 'lite', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 8, 8, 0, 0), +(48, 'admin', 'lite', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 10, 8, 0, 0), +(110, 'admin', 'rnd', 'qa', '', '待测版本列表', 'qa', 'testtask', '{\"count\":15,\"orderBy\":\"id_desc\",\"type\":\"wait\"}', 4, 8, 0, 0), +(109, 'admin', 'rnd', 'qa', '', '指派给我的用例', 'qa', 'case', '{\"count\":15,\"orderBy\":\"id_desc\",\"type\":\"assigntome\"}', 3, 4, 0, 0), +(108, 'admin', 'rnd', 'qa', '', '指派给我的Bug', 'qa', 'bug', '{\"count\":15,\"orderBy\":\"id_desc\",\"type\":\"assignedTo\"}', 2, 4, 0, 0), +(107, 'admin', 'rnd', 'qa', '', '测试统计', 'qa', 'statistic', '{\"type\":\"noclosed\",\"count\":\"20\"}', 1, 8, 0, 0), +(53, '', 'rnd', 'my', '', '欢迎', '', 'welcome', '', 1, 8, 0, 0), +(54, '', 'rnd', 'my', '', '最新动态', '', 'dynamic', '', 2, 4, 0, 0), +(55, '', 'rnd', 'my', '', '流程图', '', 'flowchart', '', 3, 8, 0, 0), +(56, '', 'rnd', 'my', '', '我的待办', 'todo', 'list', '{\"count\":\"20\"}', 4, 4, 0, 0), +(57, '', 'rnd', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 5, 8, 0, 0), +(58, '', 'rnd', 'my', '', '我的贡献', '', 'contribute', '', 6, 4, 0, 0), +(59, '', 'rnd', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 7, 8, 0, 0), +(60, '', 'rnd', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 8, 8, 0, 0), +(61, '', 'rnd', 'my', '', '项目人力投入', 'project', 'projectteam', '', 9, 8, 0, 0), +(62, '', 'rnd', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 10, 8, 0, 0), +(106, 'admin', 'rnd', 'project', 'waterfall', '最新动态', 'project', 'projectdynamic', '', 6, 4, 0, 0), +(105, 'admin', 'rnd', 'project', 'waterfall', '项目计划', 'project', 'waterfallgantt', '', 3, 8, 0, 0), +(103, 'admin', 'rnd', 'my', '', '项目人力投入', 'project', 'projectteam', '', 9, 8, 0, 0), +(104, 'admin', 'rnd', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 10, 8, 0, 0);