From 4ee8102f5d74e1f301849b7148d030aa09d1373b Mon Sep 17 00:00:00 2001 From: huairong Date: Wed, 25 Dec 2024 14:31:02 +0800 Subject: [PATCH] + [task#135062,doing,0.3h,1.3h] add checkResult function. --- .../test/lib/communicate.ui.class.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/module/stakeholder/test/lib/communicate.ui.class.php b/module/stakeholder/test/lib/communicate.ui.class.php index a731dcf622..c5197c65be 100755 --- a/module/stakeholder/test/lib/communicate.ui.class.php +++ b/module/stakeholder/test/lib/communicate.ui.class.php @@ -22,4 +22,25 @@ class communicateTester extends tester $form->wait(1); return $this->checkResult($stakeholder); } + + /** + * Check the communication records on the stakeholder view page. + * 检查干系人详情页沟通记录。 + * + * @param array $stakeholder + * @access public + * @return object + */ + public function checkResult($stakeholder) + { + /* 干系人详情页,检查沟通记录信息。*/ + $browsePage = $this->loadPage('stakeholder', 'browse'); + $browsePage->wait(1); + $browsePage->dom->title->click(); + $viewPage = $this->loadPage('stakeholder', 'view'); + $viewPage->wait(1); + + if($viewPage->dom->communication->getText() != $stakeholder['comment']) return $this->failed('沟通记录信息错误'); + return $this->success('沟通记录保存成功'); + } }