add classes for soft credit listing and fixed WebTest_Contribute_ContactContextAddTest
authorkurund <kurund@civicrm.org>
Mon, 12 Aug 2013 17:11:04 +0000 (22:41 +0530)
committerkurund <kurund@civicrm.org>
Mon, 12 Aug 2013 17:11:04 +0000 (22:41 +0530)
templates/CRM/Contribute/Form/ContributionView.tpl
tests/phpunit/WebTest/Contribute/ContactContextAddTest.php

index 210862dc32ea9e07cb599a64c2ea0889d3a7d050..2c4181598fc5a4ca42f18363ea0a900c498da7de 100644 (file)
 </table>
 
 {if $softContributions and !$pcp_id} {* We show soft credit name with PCP section if contribution is linked to a PCP. *}
-  <div class="crm-accordion-wrapper ">
+  <div class="crm-accordion-wrapper crm-soft-credit-pane">
     <div class="crm-accordion-header">
       {ts}Soft Credit{/ts}
     </div>
     <div class="crm-accordion-body">
-      <table class="crm-info-panel">
+      <table class="crm-info-panel crm-soft-credit-listing">
         {foreach from=$softContributions.soft_credit item="softCont"}
           <tr>
             <td>
               <a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$softCont.contact_id`"}"
-                 id="view_contact" title="{ts}View contact record{/ts}">{$softCont.contact_name}
+                 title="{ts}View contact record{/ts}">{$softCont.contact_name}
               </a>
             </td>
             <td>{$softCont.amount|crmMoney:$currency}</td>
index da7eaf6a14985a43a106cba0efa15630cda768b7..24ed35fdd8167f9e448255ef0f21d4ad06543a2b 100644 (file)
@@ -180,7 +180,7 @@ class WebTest_Contribute_ContactContextAddTest extends CiviSeleniumTestCase {
     $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $searchParams, $compareParams);
 
     // go to soft creditor contact view page
-    $this->click( "xpath=id('ContributionView')/div[2]/table[1]/tbody/tr[17]/td[2]/a[text()='{$softCreditFname} {$softCreditLname}']" );
+    $this->click("css=table.crm-soft-credit-listing tbody tr td a");
 
     // go to contribution tab
     $this->waitForElementPresent("css=li#tab_contribute a");