Webtest Fixes
authorWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 13 Mar 2015 13:21:14 +0000 (18:51 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 13 Mar 2015 13:21:14 +0000 (18:51 +0530)
tests/phpunit/WebTest/Campaign/MembershipTest.php
tests/phpunit/WebTest/Case/AddCaseTest.php
tests/phpunit/WebTest/Contribute/UpdateBatchPendingContributionTest.php
tests/phpunit/WebTest/Event/ParticipantSearchTest.php

index b6db393cda3405c0c61f80ebe367f8e4238bcdfa..70a2fb3eb2145fd0f611cd99a2ae07d9dd61d987 100644 (file)
@@ -104,8 +104,8 @@ class WebTest_Campaign_MembershipTest extends CiviSeleniumTestCase {
 
     $this->waitForText('crm-notification-container', "Campaign $title");
 
-    $this->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
-    $id = (int) $this->getText("//div[@id='campaignList']/div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
+    $this->waitForElementPresent("//div[@id='campaignList']/div/table/tbody/tr/td[3]/div[text()='{$campaignTitle}']/../../td[1]");
+    $id = (int) $this->getText("//div[@id='campaignList']/div/table/tbody/tr/td[3]/div[text()='{$campaignTitle}']/../../td[1]");
     $this->memberAddTest($campaignTitle, $id);
   }
 
index 5c0d3be22fccb42c61c9bbf6353bda8a9b96efcc..549be18df4bdaa3d8fd80c7b16b64ca145aad462 100644 (file)
@@ -295,9 +295,8 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase {
 
     $this->clickPopupLink("xpath=//table[@class='caseSelector']/tbody//tr/td[3]/a[text()='{$lastName}, {$firstName}']/../../td[11]/span[2]/ul/li/a[contains(text(),'Assign to Another Client')]");
     $client = $this->createDialogContact("reassign_contact_id");
-    $this->click('_qf_EditClient_done-bottom');
-    $this->verifyText("xpath=//table[@class='caseSelector']/tbody//tr/td[3]/a", $firstName);
-    $this->verifyText("xpath=//table[@class='caseSelector']/tbody//tr/td[6]", $caseTypeLabel);
+    $this->clickLink('_qf_EditClient_done-bottom');
+    $this->assertElementContainsText('page-title', "{$client['display_name']} - $caseTypeLabel");
   }
 
 }
index 9cad8ffcc48da0443aff037aefcba38ac734fbde..1564bf1e8dce1939bae7a7080133ab9d4b1a3539 100644 (file)
@@ -44,7 +44,7 @@ class WebTest_Contribute_UpdateBatchPendingContributionTest extends CiviSelenium
     $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low");
 
     $this->type("sort_name", "Individual");
-    $this->click('contribution_status_id');
+    $this->multiselect2('contribution_status_id', array("Pending"));
     $this->clickLink("_qf_Search_refresh");
 
     $this->click('radio_ts', 'ts_all');
@@ -59,7 +59,7 @@ class WebTest_Contribute_UpdateBatchPendingContributionTest extends CiviSelenium
     $this->waitForElementPresent("contribution_date_low");
 
     $this->type("sort_name", "Individual");
-    $this->click('contribution_status_id');
+    $this->multiselect2('contribution_status_id', array("Completed"));
     $this->click("_qf_Search_refresh");
 
     $this->waitForPageToLoad($this->getTimeoutMsec());
index 35b4663ccfaa6cd5c83cb59332bd9eaa98366096..eb884aeee1d3c1d4db0cd42b3fc07f528c359b10 100644 (file)
@@ -107,6 +107,7 @@ class WebTest_Event_ParticipantSearchTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent('_qf_Search_refresh');
 
     $eventName = "Fall Fundraiser Dinner";
+    $this->waitForElementPresent("event_id");
     $this->select2("event_id", $eventName);
 
     $this->clickLink("_qf_Search_refresh", "search-status");
@@ -154,6 +155,7 @@ class WebTest_Event_ParticipantSearchTest extends CiviSeleniumTestCase {
     $eventTypeName = 'Fundraiser';
     $this->waitForElementPresent('event_type_id');
     $this->select2("event_type_id", $eventTypeName);
+    $this->waitForElementPresent('event_relative');
     $this->select('event_relative', "label=Choose Date Range");
     $this->webtestFillDate('event_start_date_low', '-2 year');
     $this->webtestFillDate('event_end_date_high', '+1 year');