Fix for webtests
authorRohan Katkar <rohan.katkar@webaccessglobal.com>
Tue, 23 Dec 2014 13:24:28 +0000 (18:54 +0530)
committerRohan Katkar <rohan.katkar@webaccessglobal.com>
Tue, 23 Dec 2014 13:24:28 +0000 (18:54 +0530)
tests/phpunit/WebTest/Contact/SearchBuilderTest.php
tests/phpunit/WebTest/Contribute/OnlineContributionTest.php
tests/phpunit/WebTest/Event/AddEventTest.php
tests/phpunit/WebTest/Profile/BatchUpdateTest.php
tests/phpunit/WebTest/Profile/ProfileGroupSubscriptionTest.php

index 3d67c5e334732f6fd52acc9e8e980e3484b6b9ba..42904ee041d20ffa962f96bdc2bfab682a214d67 100644 (file)
@@ -50,7 +50,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad();
 
     // We should get no results. But check the options are all still set
-    $this->waitForTextPresent('None found.');
+    $this->waitForTextPresent('No matches found for:');
     foreach (array($groupName, 'United States', 'Male') as $i => $label) {
       $this->waitForElementPresent("//span[@id='crm_search_value_1_$i']/select/option[2]");
       $this->assertSelectedLabel("//span[@id='crm_search_value_1_$i']/select", $label);
index e58b9a3aeb416641db0400b1eb487bf4b838d29f..65269fff48cc94652a95015a6a7f20992c309e23 100644 (file)
@@ -302,7 +302,7 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase {
       //Find Contribution
     $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low");
 
-    $this->type("sort_name", "$firstName $lastName");
+    $this->type("sort_name", "$lastName $firstName");
     $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", FALSE);
     $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE);
 
index b2a06d273739648c313b13109fba2b127837966f..a4e4062dd20496059a61a3d26818749a34fb4400 100644 (file)
@@ -681,7 +681,7 @@ class WebTest_Event_AddEventTest extends CiviSeleniumTestCase {
     $this->click('css=li#tab_reminder a');
     $this->waitForElementPresent("newScheduleReminder");
     $this->click("newScheduleReminder");
-    $this->waitForElementPresent("_qf_ScheduleReminders_upload-bottom");
+    $this->waitForElementPresent("_qf_ScheduleReminders_next-bottom");
     $this->type("title", "Event Reminder for " . $eventTitle);
     $this->select('entity', 'label=Registered');
 
@@ -701,10 +701,10 @@ class WebTest_Event_AddEventTest extends CiviSeleniumTestCase {
 
     $this->type("text_message", "This is the test text version here!!!");
     //click on save
-    $this->click('_qf_ScheduleReminders_upload-bottom');
+    $this->click('_qf_ScheduleReminders_next-bottom');
     $this->waitForElementPresent("link=Add Reminder");
 
-    $this->waitForElementPresent("link=Edit");
+    $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[7]/span/a[1]");
 
     $verifyText = array(
       1 => 'Event Reminder for ' . $eventTitle,
index 846da534583ad853ca36d05c6de13f60f5558fc2..7c491f335181e0b6e14d9e21be32a46ec642a6bf 100644 (file)
@@ -405,8 +405,8 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent('_qf_Reserve_next_reserveToInterview-top');
     $this->clickLink('_qf_Reserve_next_reserveToInterview-top', '_qf_Interview_cancel_interview');
 
-    $this->isElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody//tr/td[text()='{$Name2}']");
-    $this->isElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody//tr/td[text()='{$Name1}']");
+    $this->isElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody//tr/td[2][text()='{$Name2}']");
+    $this->isElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody//tr/td[2][text()='{$Name1}']");
 
     //edition to be done here
     // selecting first check of profile
index 04870f671ec7f315c19de3e9d4ab060ed7f5bb27..40c63ae76ab0af368807d89e74eb62b3f489a564 100644 (file)
@@ -125,7 +125,7 @@ class WebTest_Profile_ProfileGroupSubscriptionTest extends CiviSeleniumTestCase
 
     $this->isTextPresent("Your subscription request has been submitted for");
     //check if profile is saved
-    $this->waitForText('crm-notification-container','Your information has been saved.');
+    $this->isTextPresent("Your information has been saved.");
 
     // delete the profile
     $this->openCiviPage('admin/uf/group', 'reset=1');
@@ -136,8 +136,8 @@ class WebTest_Profile_ProfileGroupSubscriptionTest extends CiviSeleniumTestCase
    * @param $profileTitle
    */
   function _testdeleteProfile($profileTitle) {
-    $this->waitForElementPresent("xpath=//div[@id='user-profiles']/div/div/table/tbody//tr/td/span[text() = '$profileTitle']/../../td[7]/span[2][text()='more']/ul/li[5]/a[text()='Delete']");
-    $this->click("xpath=//div[@id='user-profiles']/div/div/table/tbody//tr/td/span[text() = '$profileTitle']/../../td[7]/span[2][text()='more']/ul/li[5]/a[text()='Delete']");
+    $this->waitForElementPresent("xpath=//div[@id='user-profiles']/div/div[1]/table/tbody//tr/td[1]/span[text() = '$profileTitle']/../../td[7]/span[2][text()='more']/ul/li[5]/a[text()='Delete']");
+    $this->click("xpath=//div[@id='user-profiles']/div/div[1]/table/tbody//tr/td[1]/span[text() = '$profileTitle']/../../td[7]/span[2][text()='more']/ul/li[5]/a[text()='Delete']");
     $this->waitForElementPresent('_qf_Group_next-bottom');
     $this->click('_qf_Group_next-bottom');
     $this->waitForElementPresent('newCiviCRMProfile-bottom');