From 14d071ba8c1fc88a74e4758216a4465fa4b02598 Mon Sep 17 00:00:00 2001 From: Maggie Date: Tue, 16 Sep 2014 13:40:59 -0400 Subject: [PATCH] CRM-15197 fixed recurring contribution test permisssion issue and added clickLink to account for load time --- tests/phpunit/CiviTest/CiviSeleniumTestCase.php | 6 +++--- .../WebTest/Contribute/OnlineRecurContributionTest.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index e99f4630e2..bcc4ad2ffc 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -737,16 +737,16 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { foreach ($processorSettings AS $f => $v) { $this->type($f, $v); } - $this->click('_qf_PaymentProcessor_next-bottom'); - $this->waitForPageToLoad($this->getTimeoutMsec()); + // Is new processor created? + $this->clickLink('_qf_PaymentProcessor_next-bottom', "xpath=//div[@class='content']//table[@class='selector row-highlight']//tbody/tr[last()]/td[2][text()='AuthNet']"); $this->assertTrue($this->isTextPresent($processorName), 'Processor name not found in selector after adding payment processor (webTestAddPaymentProcessor).'); $paymentProcessorId = explode('&id=', $this->getAttribute("xpath=//table[@class='selector row-highlight']//tbody//tr/td[text()='{$processorName}']/../td[7]/span/a[1]@href")); $paymentProcessorId = explode('&', $paymentProcessorId[1]); return $paymentProcessorId[0]; } - + function webtestAddCreditCardDetails() { $this->waitForElementPresent('credit_card_type'); $this->select('credit_card_type', 'label=Visa'); diff --git a/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php b/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php index 92fc968ccf..86bbd1c45f 100644 --- a/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php @@ -59,7 +59,7 @@ class WebTest_Contribute_OnlineRecurContributionTest extends CiviSeleniumTestCas $pcp = FALSE; // open browser, login - $this->webtestLogin(); + $this->webtestLogin('admin'); // create a new online contribution page with recurring enabled (using a newly created AuthNet processor) // create contribution page with randomized title and default params -- 2.25.1