From 73ec6821653891fb7730fb2d64257e76e6c38b71 Mon Sep 17 00:00:00 2001 From: kurund Date: Tue, 13 Aug 2013 23:05:45 +0530 Subject: [PATCH] fixes for WebTest_Contribute_StandaloneAddTest --- .../WebTest/Contribute/StandaloneAddTest.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php b/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php index f6466eabbf..cfb38511cc 100644 --- a/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php +++ b/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php @@ -147,15 +147,24 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase { 'Contribution Status' => 'Completed', 'Paid By' => 'Check', 'Check Number' => 'check #1041', - 'Soft Credit To' => "{$softCreditFname} {$softCreditLname}", ); foreach ($expected as $label => $value) { $this->verifyText("xpath=id('ContributionView')/div[2]/table[1]/tbody//tr/td[1][text()='$label']/../td[2]", preg_quote($value)); } - // go to soft creditor contact view page - $this->click("xpath=id('ContributionView')/div[2]/table[1]/tbody//tr/td[1][text()='Soft Credit To']/../td[2]/a[text()='{$softCreditFname} {$softCreditLname}']"); + // verify if soft credit was created successfully + $expected = array( + 'Soft Credit To' => "{$softCreditFname} {$softCreditLname}", + 'Amount' => '100.00', + ); + + foreach ($expected as $value) { + $this->verifyText("css=table.crm-soft-credit-listing", preg_quote($value)); + } + + // go to first soft creditor contact view page + $this->click("css=table.crm-soft-credit-listing tbody tr td a"); // go to contribution tab $this->waitForElementPresent("css=li#tab_contribute a"); -- 2.25.1