From: Web Access Date: Fri, 13 Mar 2015 13:21:14 +0000 (+0530) Subject: Webtest Fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=195986f279ee08159f663fd2c32ba15a71e9a1a7;p=civicrm-core.git Webtest Fixes --- diff --git a/tests/phpunit/WebTest/Campaign/MembershipTest.php b/tests/phpunit/WebTest/Campaign/MembershipTest.php index b6db393cda..70a2fb3eb2 100644 --- a/tests/phpunit/WebTest/Campaign/MembershipTest.php +++ b/tests/phpunit/WebTest/Campaign/MembershipTest.php @@ -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); } diff --git a/tests/phpunit/WebTest/Case/AddCaseTest.php b/tests/phpunit/WebTest/Case/AddCaseTest.php index 5c0d3be22f..549be18df4 100644 --- a/tests/phpunit/WebTest/Case/AddCaseTest.php +++ b/tests/phpunit/WebTest/Case/AddCaseTest.php @@ -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"); } } diff --git a/tests/phpunit/WebTest/Contribute/UpdateBatchPendingContributionTest.php b/tests/phpunit/WebTest/Contribute/UpdateBatchPendingContributionTest.php index 9cad8ffcc4..1564bf1e8d 100644 --- a/tests/phpunit/WebTest/Contribute/UpdateBatchPendingContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/UpdateBatchPendingContributionTest.php @@ -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()); diff --git a/tests/phpunit/WebTest/Event/ParticipantSearchTest.php b/tests/phpunit/WebTest/Event/ParticipantSearchTest.php index 35b4663ccf..eb884aeee1 100644 --- a/tests/phpunit/WebTest/Event/ParticipantSearchTest.php +++ b/tests/phpunit/WebTest/Event/ParticipantSearchTest.php @@ -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');