WebtestFix2
authorSudha Bisht <sudha.bisht@webaccessglobal.com>
Fri, 30 Oct 2015 13:57:16 +0000 (19:27 +0530)
committerSudha Bisht <sudha.bisht@webaccessglobal.com>
Fri, 30 Oct 2015 13:57:16 +0000 (19:27 +0530)
tests/phpunit/WebTest/Member/InheritedMembershipTest.php
tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php
tests/phpunit/WebTest/Member/OnlineMembershipAddPricesetTest.php
tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php

index 47b506d468ef1974052ced3b78e0e8af14888ac1..7b278ed0b226f241958e1da1c3c104347ca0c748 100644 (file)
@@ -64,9 +64,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
 
     $this->select('period_type', 'value=rolling');
 
-    $this->removeSelection('relationship_type_id', 'label=- select -');
-    $this->addSelection('relationship_type_id', 'label=Employer of');
-
+    $this->select2('relationship_type_id', 'Employer of', TRUE);
     $this->type('max_related', '5');
 
     $this->click('_qf_MembershipType_upload-bottom');
@@ -291,7 +289,6 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
 
     $this->select('period_type', 'value=rolling');
 
-    $this->removeSelection('relationship_type_id', 'label=- select -');
     $this->addSelection('relationship_type_id', 'label=Employer of');
 
     $this->type('max_related', '5');
@@ -360,12 +357,12 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
 
     // click through to the activity view screen
     $this->click('css=li#tab_activity a');
-    $this->waitForElementPresent("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody//tr/td[8]/span/a[text()='View']");
+    $this->waitForElementPresent("xpath=//table[@class='contact-activity-selector-activity crm-ajax-table dataTable no-footer']/tbody//tr/td[8]/span/a[text()='View']");
 
     // check number of activity for contact
     $this->assertEquals(1, $this->getText("xpath=//li[@id='tab_activity']/a/em"));
 
-    $url = $this->parseURL($this->getAttribute("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody//tr/td[8]/span/a[text()='View']@href"));
+    $url = $this->parseURL($this->getAttribute("xpath=//table[@class='contact-activity-selector-activity crm-ajax-table dataTable no-footer']/tbody//tr/td[8]/span/a[text()='View']@href"));
     $expectedMembershipActivityId = $url['queryString']['id'];
 
     // verify membership id with membership activity id
index ffd2504035eba83496db12b6faf4b42133b4f72f..afb77efc0f294dad659437bde17e7f866df40173 100644 (file)
@@ -201,7 +201,7 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("xpath=//table[@class='display dataTable no-footer']/tbody/tr/td[9]/span/a[contains(text(), 'View')]");
 
     // click through to the membership view screen
-
+    $this->waitForAjaxContent();
     $this->click("xpath=//table[@class='display dataTable no-footer']/tbody/tr/td[9]/span/a[contains(text(), 'View')]");
     $this->waitForElementPresent("xpath=//button//span[contains(text(),'Done')]");
 
index 4de10d433fb428bea641b5cd916e9345a235f525..db03a5601cd7d97c3d247db34fc8ed36b3682227 100644 (file)
@@ -141,7 +141,7 @@ class WebTest_Member_OnlineMembershipAddPricesetTest extends CiviSeleniumTestCas
     $i = 2;
     foreach ($options as $index => $values) {
       $this->select("membership_type_id_{$index}", "value={$values['membership_type_id']}");
-
+      $this->waitForAjaxContent();
       $this->waitForElementPresent("xpath=//table[@id='optionField']/tbody/tr[$i]/td[4]/input");
       $this->type("xpath=//table[@id='optionField']/tbody/tr[$i]/td[4]/input", $values['membership_num_terms']);
       $this->type("xpath=//table[@id='optionField']/tbody/tr[$i]/td[5]/input", $values['label']);
index 12c260214c273075de7d1948a0edc37453188507..3c44d66573a153f597d8ddbbe2034effe107a829 100644 (file)
@@ -402,9 +402,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->type('duration_interval', 1);
     $this->select('duration_unit', 'label=year');
     $this->select('period_type', 'value=rolling');
-
-    $this->removeSelection('relationship_type_id', 'label=- select -');
-    $this->addSelection('relationship_type_id', 'label=Employer of');
+    $this->select2('relationship_type_id', 'Employer of', TRUE);
 
     $this->click('_qf_MembershipType_upload-bottom');
     $this->waitForElementPresent('link=Add Membership Type');