X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FContribute%2FOnlineMultiplePaymentProcessorTest.php;h=e5f023427c615240fb143ff27d848400c3f966c6;hb=ad4f6a9c75ba3be6dfbf2e20d0d4b5796424b4c4;hp=de1bcf98b796a346c49b0c912d82a8dc5e70fe41;hpb=8f6ae60501d5d64ddbc6269648e71247dee0ce1b;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Contribute/OnlineMultiplePaymentProcessorTest.php b/tests/phpunit/WebTest/Contribute/OnlineMultiplePaymentProcessorTest.php index de1bcf98b7..e5f023427c 100644 --- a/tests/phpunit/WebTest/Contribute/OnlineMultiplePaymentProcessorTest.php +++ b/tests/phpunit/WebTest/Contribute/OnlineMultiplePaymentProcessorTest.php @@ -1,7 +1,7 @@ webtestLogin(); @@ -116,7 +116,7 @@ class WebTest_Contribute_OnlineMultiplePaymentProcessorTest extends CiviSelenium } - function testOnlineMultiplePaymentProcessorWithPayLater() { + public function testOnlineMultiplePaymentProcessorWithPayLater() { // Log in using webtestLogin() method $this->webtestLogin(); @@ -146,7 +146,7 @@ class WebTest_Contribute_OnlineMultiplePaymentProcessorTest extends CiviSelenium $isPcpApprovalNeeded = FALSE, $isSeparatePayment = FALSE, $honoreeSection = FALSE, - $allowOtherAmmount = TRUE + $allowOtherAmount = TRUE ); $this->openCiviPage("contribute/transact", "reset=1&action=preview&id=$pageId", NULL); @@ -177,27 +177,28 @@ class WebTest_Contribute_OnlineMultiplePaymentProcessorTest extends CiviSelenium $this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next-bottom"); $payLaterInstructionsText = "Pay later instructions $hash"; - $this->assertTrue($this->isTextPresent($payLaterInstructionsText)); + $this->verifyText("xpath=//div[@class='bold pay_later_receipt-section']/p", $payLaterInstructionsText); $this->click("_qf_Confirm_next-bottom"); $this->waitForPageToLoad($this->getTimeoutMsec()); - $this->assertTrue($this->isTextPresent($payLaterInstructionsText)); + $this->verifyText("xpath=//div[@id='help']/div/p", $payLaterInstructionsText); //login to check contribution $this->openCiviPage("contribute/search", "reset=1", 'contribution_date_low'); - $this->type('sort_name', "$firstName $lastName"); + $this->type('sort_name', "$lastName $firstName"); $this->check('contribution_test'); - $this->clickLink('_qf_Search_refresh', "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']"); - $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", '_qf_ContributionView_cancel-bottom'); + $this->click('_qf_Search_refresh'); + $this->waitForElementPresent("xpath=//div[@id='contributionSearch']/table/tbody/tr[1]/td[11]/span/a[text()='View']"); + $this->click("xpath=//div[@id='contributionSearch']/table/tbody/tr[1]/td[11]/span/a[text()='View']"); + $this->waitForElementPresent("_qf_ContributionView_cancel-bottom"); $expected = array( - 'From' => "{$firstName} {$lastName}", - 'Financial Type' => 'Donation', + 'From' => "{$firstName} {$lastName}", + 'Financial Type' => 'Donation', 'Contribution Status' => 'Pending : Pay Later', ); $this->webtestVerifyTabularData($expected); $this->click('_qf_ContributionView_cancel-bottom'); } } -