Refactor webtestNewDialogContact and other webtest cleanup
[civicrm-core.git] / tests / phpunit / WebTest / Contribute / UpdateBatchPendingContributionTest.php
index e5ec62e8f2b0c9702ac5ae7dbb124cfb7baa1263..e3e8b77a8d665120e577cfcd9b501f699ec892f2 100644 (file)
@@ -45,14 +45,12 @@ class WebTest_Contribute_UpdateBatchPendingContributionTest extends CiviSelenium
 
     $this->type("sort_name", "Contributor");
     $this->click('contribution_status_id_2');
-    $this->click("_qf_Search_refresh");
+    $this->clickLink("_qf_Search_refresh");
 
-    $this->waitForPageToLoad($this->getTimeoutMsec());
     $this->click('radio_ts', 'ts_all');
 
     $this->select('task', "label=Update Pending Contribution Status");
-    $this->click("_qf_Search_next_action");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->clickLink("_qf_Search_next_action");
     $this->select('contribution_status_id', 'label=Completed');
     $this->click('_qf_Status_next');
     $this->waitForElementPresent("_qf_Result_done");
@@ -191,14 +189,10 @@ class WebTest_Contribute_UpdateBatchPendingContributionTest extends CiviSelenium
   }
 
   function _testOfflineContribution() {
-    $firstName = substr(sha1(rand()), 0, 7);
-    $lastName  = 'Contributor';
-    $email     = $firstName . "@example.com";
-
     $this->openCiviPage("contribute/add", "reset=1&context=standalone", "_qf_Contribution_upload");
 
     // create new contact using dialog
-    $this->webtestNewDialogContact($firstName, "Contributor", $email);
+    $this->createDialogContact();
 
     // select financial type
     $this->select( "financial_type_id", "value=1" );