Merge pull request #8206 from yashodha/fix.CRM-17893
[civicrm-core.git] / tests / phpunit / WebTest / Member / InheritedMembershipTest.php
index 826746a54f262383c079326def24dbd49240cc20..8b921fc732a6e13d194824bdf02bbb395ad95c4d 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -392,7 +392,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
     $this->click('css=li#tab_activity a');
     $this->waitForElementPresent("xpath=//table[@class='contact-activity-selector-activity crm-ajax-table dataTable no-footer']/tbody/tr/td[8]/span/a");
     $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@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@href"));
     $actualMembershipActivityId1 = $url['queryString']['id'];
 
     // verify membership id and membership activity id with previous one
@@ -424,9 +424,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');
@@ -474,9 +472,9 @@ 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']");
     $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"));
     $actualMembershipActivityId2 = $url['queryString']['id'];
 
     // verify membership id and membership activity id with previous one
@@ -512,7 +510,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
 
     // click through to the activity view screen
     $this->click('css=li#tab_activity a');
-    $this->waitForText("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody/tr/td", "No matches found.");
+    $this->waitForText("xpath=//table[@class='contact-activity-selector-activity crm-ajax-table dataTable no-footer']/tbody/tr/td", "None found.");
     $this->assertEquals(0, $this->getText("xpath=//li[@id='tab_activity']/a/em"));
 
     // click through to the relationship view screen