From e6a00deda68407ecefe4f88f035ffebe68050682 Mon Sep 17 00:00:00 2001 From: yulujie Date: Tue, 16 Jul 2024 09:01:53 +0800 Subject: [PATCH] * [task#123177,doing,3h,2h] Add ui test files of create pivot. --- .../pivot/test/lib/createpivot.ui.class.php | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 module/pivot/test/lib/createpivot.ui.class.php diff --git a/module/pivot/test/lib/createpivot.ui.class.php b/module/pivot/test/lib/createpivot.ui.class.php new file mode 100644 index 0000000000..8958162d55 --- /dev/null +++ b/module/pivot/test/lib/createpivot.ui.class.php @@ -0,0 +1,42 @@ +loadPage(); + $form->wait(1); + $form->dom->btn($this->lang->pivot->group)->picker($pivot['group']); + $form->dom->btn($this->lang->pivot->name)->picker($pivot['name']); + $form->dom->btn($this->lang->save)->click(); + $form->wait(1); + } + + /** + * 创建透视表。 + * Create pivot table. + * + * @param array $pivot + * @access public + * @return object + */ + public function create($pivot) + { + $form = $this->initForm('pivot', 'browse', '', 'appIframe-bi'); + $form->dom->btn($this->lang->pivot->create)->click(); + $fhis->inputFields($pivot); + $form->wait(1); + + $browsePage = $this->loadPage('pivot', 'browse'); + $name = $browsePage->dom->firstName->getText(); + if($name == $pivot['name']) return $this->success('创建透视表成功'); + return $this->failed('创建透视表失败'); + } +}