Fixed webtest
authorpratikshad <pratiksha.dubey@webaccess.co.in>
Tue, 12 May 2015 12:01:52 +0000 (17:31 +0530)
committerpratikshad <pratiksha.dubey@webaccess.co.in>
Tue, 12 May 2015 12:01:52 +0000 (17:31 +0530)
tests/phpunit/WebTest/Contact/AdvancedSearchTest.php
tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php

index 7b77ba2b015a2196f4263a00d8eb7207f45e4f1b..113255062388d9b6ba1282e3a03bcdd7bb813ad4 100644 (file)
@@ -255,6 +255,8 @@ class WebTest_Contact_AdvancedSearchTest extends CiviSeleniumTestCase {
     $stateBeforeSort = $this->getText("xpath=//div[@class='crm-search-results']//table/tbody/tr[1]/td[6]");
     $this->clickAjaxLink("xpath=//div[@class='crm-search-results']//table/thead/tr//th/a[contains(text(),'State')]");
     $this->waitForElementPresent("xpath=//div[@class='crm-search-results']//table/thead/tr//th/a[contains(text(),'State')]");
+    $this->clickAjaxLink("xpath=//div[@class='crm-search-results']//table/thead/tr//th/a[contains(text(), 'State')]");
+    $this->waitForElementPresent("xpath=//div[@class='crm-search-results']//table/thead/tr//th/a[contains(text(), 'State')]");
     $this->assertElementNotContainsText("xpath=//div[@class='crm-search-results']//table/tbody/tr[1]/td[6]", $stateBeforeSort);
   }
 
index 021e4c3214c22d355acf5d10aa044fcdcf386a87..26555c75e70c935b01916e50a587cc536b5b2f50 100644 (file)
@@ -198,12 +198,12 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase {
     // page was loaded
     $this->waitForTextPresent($sourceText);
 
-    $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span[1]/a[1][text()='View']");
+    $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[contains(text(), 'View')]");
 
     // click through to the membership view screen
-    $this->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']");
+    $this->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[contains(text(), 'View')]");
 
-    $this->waitForElementPresent("xpath=//button//span[contains(text(),'Done')]");
+    $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
 
     $joinDate = date('F jS, Y');
     $startDate = date('F jS, Y', strtotime("+1 month"));