webtest fixes
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 16 Mar 2015 13:06:08 +0000 (18:36 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 16 Mar 2015 13:06:08 +0000 (18:36 +0530)
tests/phpunit/WebTest/Event/AddEventTest.php
tests/phpunit/WebTest/Member/DefaultMembershipPricesetTest.php
tests/phpunit/WebTest/Profile/ProfileAddTest.php

index 0b7b674d34ab93e627c99fcc34ac8e83dec8b1cf..0f18e4a5a9e71a3fffe0433c61b9b0fc931f4297 100644 (file)
@@ -806,7 +806,7 @@ class WebTest_Event_AddEventTest extends CiviSeleniumTestCase {
 
     $this->openCiviPage("event/search?reset=1", "reset=1");
     $this->select2("event_id", $eventTitle, FALSE);
-    $this->click("xpath=//div[@id='searchForm']/table/tbody/tr[5]/td[1]/div//div/label[text()='Pending from pay later']");
+    $this->multiselect2('participant_status_id', array('Pending from pay later'));
     $this->clickLink('_qf_Search_refresh');
     $this->waitForElementPresent("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[2][text()='Edit']");
 
@@ -834,7 +834,7 @@ class WebTest_Event_AddEventTest extends CiviSeleniumTestCase {
 
     $this->openCiviPage("event/search?reset=1", "reset=1");
     $this->select2("event_id", $eventTitle, FALSE);
-    $this->click("xpath=//td[@class='crm-event-form-block-participant_status']/div[@class='listing-box']//div/label[text()='Pending from pay later']");
+    $this->multiselect2('participant_status_id', array('Pending from pay later'));
     $this->clickLink('_qf_Search_refresh');
     $this->waitForElementPresent("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[text()='View']");
     $uRL = $this->getAttribute("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[text()='View']@href");
index 793098300423a02b450000b2e8bbcdc9de33e17e..a32cbbf3443d3b531e0dddb8f5722f58c6f7df74 100755 (executable)
@@ -120,7 +120,8 @@ class WebTest_Member_DefaultMembershipPricesetTest extends CiviSeleniumTestCase
 
     $this->_testDefaultSenarios("National_Membership_{$title}-section", 1);
     $this->contactInfoFill($firstName, $lastName, $email, $contactParams, $streetAddress);
-    $this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next-bottom");
+    $this->clickLink("_qf_Main_upload-bottom", "_qf_Main_upload-bottom");
+    $this->assertTrue($this->isTextPresent("You already have a lifetime membership and cannot select a membership with a shorter term."));
   }
 
   /**
index 57dfc807fa403de01e4152c63932327a04a1a620..2582b8ea209eb324b63c3d72b834e76b9522c2c4 100644 (file)
@@ -282,7 +282,7 @@ class WebTest_Profile_ProfileAddTest extends CiviSeleniumTestCase {
     $this->select("field_name_2", "value=2");
 
     // click on Save buttonProfile Field Saved
-    $this->clickLink('_qf_Field_next-bottom', "xpath=//a/span[text()='Add Field']", FALSE);
+    $this->clickLink('_qf_Field_next-bottom', "xpath=//a/span[text()=' Add Field']", FALSE);
 
     // Wait for "saved" status msg
     $this->waitForText('crm-notification-container', "Profile Field Saved");
@@ -293,7 +293,7 @@ class WebTest_Profile_ProfileAddTest extends CiviSeleniumTestCase {
     $id = $id[1];
 
     // click on Edit Settings
-    $this->clickLink("xpath=//a/span[text()='Edit Settings']", '_qf_Group_next-bottom', FALSE);
+    $this->clickLink("xpath=//a/span[text()=' Edit Settings']", '_qf_Group_next-bottom', FALSE);
 
     // check for description field
     $this->waitForElementPresent('description');
@@ -301,7 +301,7 @@ class WebTest_Profile_ProfileAddTest extends CiviSeleniumTestCase {
     $this->assertEquals($this->getValue('description'), $profileDescription);
 
     // click on save button
-    $this->clickLink('_qf_Group_next-bottom', "xpath=//a/span[text()='Edit Settings']", FALSE);
+    $this->clickLink('_qf_Group_next-bottom', "xpath=//a/span[text()=' Edit Settings']", FALSE);
 
     // Wait for "saved" status msg
     $this->waitForText('crm-notification-container', 'Profile Saved');