From c27684865f41542c9439a32de59bf21f0899386a Mon Sep 17 00:00:00 2001 From: kurund Date: Tue, 13 Aug 2013 17:32:19 +0530 Subject: [PATCH] fixes for --filter=testContributeOfflineforSoftcreditwithApi WebTest_Contribute_AddPricesetTest --- .../WebTest/Contribute/AddPricesetTest.php | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/WebTest/Contribute/AddPricesetTest.php b/tests/phpunit/WebTest/Contribute/AddPricesetTest.php index 7153abc7bf..28e8e5d824 100644 --- a/tests/phpunit/WebTest/Contribute/AddPricesetTest.php +++ b/tests/phpunit/WebTest/Contribute/AddPricesetTest.php @@ -612,7 +612,6 @@ class WebTest_Contribute_AddPricesetTest extends CiviSeleniumTestCase { 'Paid By' => 'Check', 'Check Number' => '1041', 'Contribution Status' => 'Completed', - 'Soft Credit To' => "$firstNameSoft $lastNameSoft", ); $this->webtestVerifyTabularData($expected); @@ -628,6 +627,16 @@ class WebTest_Contribute_AddPricesetTest extends CiviSeleniumTestCase { ); } + // verify if soft credit was created successfully + $softCreditValues = array( + 'Soft Credit To' => "{$firstNameSoft} {$lastNameSoft}", + 'Amount' => '65.00', + ); + + foreach ($softCreditValues as $value) { + $this->verifyText("css=table.crm-soft-credit-listing", preg_quote($value)); + } + // Check for Soft contact created $this->click("css=input#sort_name_navigation"); $this->type("css=input#sort_name_navigation", "$lastNameSoft, $firstNameSoft"); @@ -668,9 +677,19 @@ class WebTest_Contribute_AddPricesetTest extends CiviSeleniumTestCase { 'Contribution Status' => $fields['values'][$fields['id']]['contribution_status'], 'Paid By' => $fields['values'][$fields['id']]['contribution_payment_instrument'], 'Check Number' => $fields['values'][$fields['id']]['contribution_check_number'], - 'Soft Credit To' => $softCreditContact->display_name, ); + $this->webtestVerifyTabularData($expected); + + // verify if soft credit + $softCreditValues = array( + 'Soft Credit To' => $softCreditContact->display_name, + 'Amount' => '65.00', + ); + + foreach ($softCreditValues as $value) { + $this->verifyText("css=table.crm-soft-credit-listing", preg_quote($value)); + } } } -- 2.25.1