From c6218cbd2a4340ff5750e2055e6b7b288a0dd821 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Tue, 6 Sep 2016 17:02:10 +0530 Subject: [PATCH] return to the contrib edit form --- templates/CRM/Contribute/Form/Contribution.tpl | 2 +- .../WebTest/Contribute/UpdatePendingContributionTest.php | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/templates/CRM/Contribute/Form/Contribution.tpl b/templates/CRM/Contribute/Form/Contribution.tpl index fd2ba2b433..4d509a865d 100644 --- a/templates/CRM/Contribute/Form/Contribution.tpl +++ b/templates/CRM/Contribute/Form/Contribution.tpl @@ -184,7 +184,7 @@ {if $contactId && $contribID && $contributionMode EQ null && $contribution_status_id eq 2} {capture assign=payNowLink}{crmURL p='civicrm/contact/view/contribution' q="reset=1&action=update&id=`$contribID`&cid=`$contactId`&context=`$context`&mode=live"}{/capture} - » {ts}Pay with Credit Card{/ts} + » {ts}Pay with Credit Card{/ts} {/if} diff --git a/tests/phpunit/WebTest/Contribute/UpdatePendingContributionTest.php b/tests/phpunit/WebTest/Contribute/UpdatePendingContributionTest.php index edaee81c30..9602c258f5 100644 --- a/tests/phpunit/WebTest/Contribute/UpdatePendingContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/UpdatePendingContributionTest.php @@ -47,8 +47,8 @@ class WebTest_Contribute_UpdatePendingContributionTest extends CiviSeleniumTestC $this->clickPopupLink("xpath=//table[@class='selector row-highlight']/tbody//tr/td[8]/span/a[@title='Edit Contribution']"); $this->waitForElementPresent('financial_type_id'); - $this->clickPopupLink("xpath=//a[contains(text(), 'Pay Now')]"); - $this->assertElementContainsText("xpath=//span[@class='ui-dialog-title']", "Edit Contribution (Pay Now)"); + $this->clickPopupLink("xpath=//a[contains(text(), 'Pay with Credit Card')]"); + $this->assertElementContainsText("xpath=//span[@class='ui-dialog-title']", "Pay with Credit Card"); $this->assertElementNotPresent("xpath=//select[@id='currency']"); $this->assertNotEditable('total_amount'); $this->assertElementNotPresent("xpath=//select[@id='contribution_status_id']"); @@ -56,6 +56,11 @@ class WebTest_Contribute_UpdatePendingContributionTest extends CiviSeleniumTestC $this->webtestAddCreditCardDetails(); $this->webtestAddBillingDetails(); + //return to the edit contrib form + $this->clickAjaxLink('_qf_Contribution_upload-bottom'); + $this->waitForText('crm-notification-container', "The contribution record has been saved."); + + //save the edit form $this->clickAjaxLink('_qf_Contribution_upload-bottom'); $this->waitForText('crm-notification-container', "The contribution record has been saved."); -- 2.25.1