From: Sudha Bisht Date: Fri, 30 Oct 2015 13:57:16 +0000 (+0530) Subject: WebtestFix2 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f64f0f3cae18766d3f69823129e1480c65c8f8fe;p=civicrm-core.git WebtestFix2 --- diff --git a/tests/phpunit/WebTest/Member/InheritedMembershipTest.php b/tests/phpunit/WebTest/Member/InheritedMembershipTest.php index 47b506d468..7b278ed0b2 100644 --- a/tests/phpunit/WebTest/Member/InheritedMembershipTest.php +++ b/tests/phpunit/WebTest/Member/InheritedMembershipTest.php @@ -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 diff --git a/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php b/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php index ffd2504035..afb77efc0f 100644 --- a/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php +++ b/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php @@ -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')]"); diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipAddPricesetTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipAddPricesetTest.php index 4de10d433f..db03a5601c 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipAddPricesetTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipAddPricesetTest.php @@ -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']); diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php index 12c260214c..3c44d66573 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php @@ -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');