From: jitendrapurohit Date: Mon, 16 Mar 2015 13:06:08 +0000 (+0530) Subject: webtest fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a44a139f3a9bfa2418daed871d5eee8aa3e02da2;p=civicrm-core.git webtest fixes --- diff --git a/tests/phpunit/WebTest/Event/AddEventTest.php b/tests/phpunit/WebTest/Event/AddEventTest.php index 0b7b674d34..0f18e4a5a9 100644 --- a/tests/phpunit/WebTest/Event/AddEventTest.php +++ b/tests/phpunit/WebTest/Event/AddEventTest.php @@ -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"); diff --git a/tests/phpunit/WebTest/Member/DefaultMembershipPricesetTest.php b/tests/phpunit/WebTest/Member/DefaultMembershipPricesetTest.php index 7930983004..a32cbbf344 100755 --- a/tests/phpunit/WebTest/Member/DefaultMembershipPricesetTest.php +++ b/tests/phpunit/WebTest/Member/DefaultMembershipPricesetTest.php @@ -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.")); } /** diff --git a/tests/phpunit/WebTest/Profile/ProfileAddTest.php b/tests/phpunit/WebTest/Profile/ProfileAddTest.php index 57dfc807fa..2582b8ea20 100644 --- a/tests/phpunit/WebTest/Profile/ProfileAddTest.php +++ b/tests/phpunit/WebTest/Profile/ProfileAddTest.php @@ -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');