From 13be592045db6c722d531ce165295b3b486e569a Mon Sep 17 00:00:00 2001 From: lixiaoyu Date: Tue, 18 Feb 2025 08:22:20 +0000 Subject: [PATCH] *[task#137817,doing,1h,2h] add function of edit card --- module/kanban/test/lib/card.ui.class.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/module/kanban/test/lib/card.ui.class.php b/module/kanban/test/lib/card.ui.class.php index 6ba1a7c151..93e4e86f59 100755 --- a/module/kanban/test/lib/card.ui.class.php +++ b/module/kanban/test/lib/card.ui.class.php @@ -36,4 +36,24 @@ class cardTester extends tester ? $this->success('创建卡片成功') : $this->failed('创建卡片失败'); } + + public function editCard($kanbanurl, $card) + { + $form = $this->initForm('kanban', 'view', $kanbanurl, 'appIframe-kanban'); + $form->dom->moreBtn->click(); + $form->dom->btn($this->lang->kanban->editCard)->click(); + if (isset($card->name)) $form->dom->name->setValue($card->name); + if (isset($card->begin)) $form->dom->begin->datePicker($card->begin); + if (isset($card->end)) $form->dom->end->datePicker($card->end); + $form->dom->btn($this->lang->save)->click(); + if ($form->dom->zin_kanban_editcard_1_form) + { + return ($form->dom->endTip->getText() == $this->lang->kanbancard->error->endSmall) + ? $this->success('卡片日期校验提示正确') + : $this->failed('卡片日期校验提示不正确'); + } + return ($form->dom->firCardName->getText() == $card->name) + ? $this->success('编辑卡片成功') + : $this->failed('编辑卡片失败'); + } }