Webtest Fix-4.6
authorWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 26 Jun 2015 13:11:17 +0000 (18:41 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 26 Jun 2015 13:11:17 +0000 (18:41 +0530)
tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php
tests/phpunit/WebTest/Import/AddressImportTest.php
tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php

index f7aad33196340a06f38af813a814e8e143ec48b9..8c094a505428cbc5082f9fd8d8cb7fce5d8e88e2 100755 (executable)
@@ -121,8 +121,8 @@ class WebTest_ACL_AssignUsersToRolesTest extends CiviSeleniumTestCase {
     $this->click('_qf_Basic_refresh');
     $this->waitForPageToLoad($this->getTimeoutMsec());
     $this->waitForElementPresent("_qf_Basic_next_action");
-    $this->assertTrue($this->isElementPresent("xpath=//table/tbody//tr/td[3]/a[text()='{$lastName}, {$firstName}']"));
-    $this->click("xpath=//table/tbody//tr/td[1]/input[@type='checkbox']");
+    $this->assertTrue($this->isElementPresent("xpath=//table[@class='selector row-highlight']/tbody/tr/td[3]/a[text()='{$lastName}, {$firstName}']"));
+    $this->click("xpath=//table[@class='selector row-highlight']/tbody//tr/td[1]/input[@type='checkbox']");
     $this->click('_qf_Basic_next_action');
     $this->waitForElementPresent("_qf_AddToGroup_back-bottom");
     $this->click('_qf_AddToGroup_next-bottom');
index 423ac50b397ff7e002b9d0bc483f6a58d7635b09..66d75a24202a1a0aeb5f1c2f20b597509ba1bddb 100644 (file)
@@ -141,6 +141,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
 
     $this->waitForText('crm-notification-container', "Custom field '{$customField}' has been saved.");
     $this->assertTrue($this->isTextPresent($customField), 'Missing text: ' . $customField);
+    $this->waitForAjaxContent();
     $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customField']/../../td[8]/span/a@href"));
     $customFieldId = $customFieldId[1];
 
@@ -156,6 +157,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $this->waitForElementPresent('newCustomField');
     $this->waitForText('crm-notification-container', "Custom field '{$customField1}' has been saved.");
     $this->assertTrue($this->isTextPresent($customField1), 'Missing text: ' . $customField1);
+    $this->waitForAjaxContent();
     $customFieldId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customField1']/../../td[8]/span/a@href"));
     $customFieldId1 = $customFieldId1[1];
 
@@ -171,6 +173,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $this->waitForElementPresent('newCustomField');
     $this->waitForText('crm-notification-container', "Custom field '{$customField2}' has been saved.");
     $this->assertTrue($this->isTextPresent($customField2), 'Missing text: ' . $customField2);
+    $this->waitForAjaxContent();
     $customFieldId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customField2']/../../td[8]/span/a@href"));
     $customFieldId2 = $customFieldId2[1];
 
@@ -222,6 +225,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $this->waitForElementPresent('newCustomField');
     $this->waitForText('crm-notification-container', "Custom field '{$customField9}' has been saved.");
     $this->assertTrue($this->isTextPresent($customField9), 'Missing text: ' . $customField9);
+    $this->waitForAjaxContent();
     $customFieldId9 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customField9']/../../td[8]/span/a@href"));
     $customFieldId9 = $customFieldId9[1];
 
@@ -238,6 +242,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $this->waitForElementPresent('newCustomField');
     $this->waitForText('crm-notification-container', "Custom field '{$customField10}' has been saved.");
     $this->assertTrue($this->isTextPresent($customField9), 'Missing text: ' . $customField9);
+    $this->waitForAjaxContent();
     $customFieldId10 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customField10']/../../td[8]/span/a@href"));
     $customFieldId10 = $customFieldId10[1];
 
@@ -306,6 +311,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $this->waitForElementPresent('newCustomField');
     $this->waitForText('crm-notification-container', "Custom field '{$customFieldName}' has been saved.");
     $this->assertTrue($this->isTextPresent($customFieldName), 'Missing text: ' . $customFieldName);
+    $this->waitForAjaxContent();
     $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customFieldName']/../../td[8]/span/a@href"));
     $customFieldId = $customFieldId[1];
     return $customFieldId;
index 53f1e9f207989afeb13b84615b5814a3b1919e5d..cc28803c0170f569382c82988cd31fb610c20421 100644 (file)
@@ -185,10 +185,10 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase {
     // Is status message correct?
     $this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
 
-    $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Renew']");
+    $this->waitForElementPresent("xpath=//table[@class='display dataTable no-footer']/tbody/tr/td[9]//span[text()='more']/ul/li[1]/a[text()='Renew']");
 
     // click through to the Membership Renewal Link
-    $this->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Renew']");
+    $this->click("xpath=//table[@class='display dataTable no-footer']/tbody/tr/td[9]//span[text()='more']/ul/li[1]/a[text()='Renew']");
 
     $this->waitForElementPresent('_qf_MembershipRenewal_cancel-bottom');
 
@@ -198,10 +198,10 @@ 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/a[contains(text(), 'View')]");
+    $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->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[contains(text(), 'View')]");
+    $this->click("xpath=//table[@class='display dataTable no-footer']/tbody/tr/td[9]/span/a[contains(text(), 'View')]");
 
     $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");