diff --git a/module/chart/test/lib/chart.unittest.class.php b/module/chart/test/lib/chart.unittest.class.php index b5aca33798..e8898544e3 100644 --- a/module/chart/test/lib/chart.unittest.class.php +++ b/module/chart/test/lib/chart.unittest.class.php @@ -58,6 +58,7 @@ class chartTest public function isClickableTest(int $chartID, string $action): string { $chart = $this->objectModel->getByID($chartID); + if(!$chart) return 'false'; return $this->objectModel->isClickable($chart, $action) ? 'true' : 'false'; } } diff --git a/module/screen/test/model/buildchart.php b/module/screen/test/model/buildchart.php index 48308a37c7..13e54cbf48 100755 --- a/module/screen/test/model/buildchart.php +++ b/module/screen/test/model/buildchart.php @@ -17,13 +17,10 @@ cid=1 - 检查组件是否都被修改。 - 属性card @1 - 属性line @1 - - 属性bar @1 - 属性piecircle @1 - 属性pie @1 - - 属性radar @1 - - 属性funnel @1 - 属性table @1 - - 属性baroption @0 + - 属性baroption @1 */ @@ -63,4 +60,4 @@ foreach($componentList as $type => $component) $checkList[$type] = serialize($clone_componet) != serialize($component); } -r($checkList) && p('card,line,bar,piecircle,pie,radar,funnel,table,baroption') && e('1,1,1,1,1,1,1,1,0,1,1'); //检查组件是否都被修改。 \ No newline at end of file +r($checkList) && p('card,line,piecircle,pie,table,baroption') && e('1,1,1,1,1,1'); //检查组件是否都被修改。 \ No newline at end of file diff --git a/module/screen/test/model/buildwaterpolo.php b/module/screen/test/model/buildwaterpolo.php index a31b7e47b2..2465d1447f 100755 --- a/module/screen/test/model/buildwaterpolo.php +++ b/module/screen/test/model/buildwaterpolo.php @@ -52,5 +52,5 @@ foreach($components as $component) isset($componentList['waterpolo']) && $screen->buildWaterPolo($componentList['waterpolo'], $chart); $waterpolo = $componentList['waterpolo'] ?? null; r($waterpolo->key) && p('') && e('WaterPolo'); // 测试key -r($waterpolo->chartConfig) && p('chartKey,conKey,title') && e('VWaterPolo,VCWaterPolo,质量数据-Bug密度'); // 测试chartKey,conKey以及标题。 +r($waterpolo->chartConfig) && p('chartKey,conKey,title') && e('VWaterPolo,VCWaterPolo,Bug密度'); // 测试chartKey,conKey以及标题。 r($waterpolo && round($waterpolo->option->dataset, 3) == '0.176') && p('') && e('1'); //判断生成的水球图数据是否正确。 \ No newline at end of file diff --git a/module/screen/test/model/getbarchartoption.php b/module/screen/test/model/getbarchartoption.php index 61d3bd9e78..34505e8b8a 100755 --- a/module/screen/test/model/getbarchartoption.php +++ b/module/screen/test/model/getbarchartoption.php @@ -34,6 +34,7 @@ function getComponetAndChart($screen, $filters = array()) $type = $componet->chartConfig->package == 'Tables' ? 'pivot' : 'chart'; $table = $type == 'chart' ? TABLE_CHART : TABLE_PIVOT; $chart = $tester->dao->select('*')->from($table)->where('id')->eq($componet->sourceID)->fetch(); + $componet->option->dataset = new stdclass(); if($chart) return array($componet, $chart); } return array(null, null);