From: kurund Date: Tue, 13 Aug 2013 12:02:19 +0000 (+0530) Subject: fixes for --filter=testContributeOfflineforSoftcreditwithApi WebTest_Contribute_AddPr... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c27684865f41542c9439a32de59bf21f0899386a;p=civicrm-core.git fixes for --filter=testContributeOfflineforSoftcreditwithApi WebTest_Contribute_AddPricesetTest --- 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)); + } } }