Tests fix
authorWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 18 Dec 2015 13:22:46 +0000 (18:52 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 18 Dec 2015 13:22:46 +0000 (18:52 +0530)
tests/phpunit/WebTest/Contact/RelationshipAddTest.php
tests/phpunit/WebTest/Contribute/StandaloneAddTest.php
tests/phpunit/WebTest/Event/AddParticipationTest.php

index d4e7a1e806d9944e045c6dac1560d36bd1848965..1255f48c82d165a3b2cdb7afb33c34ef8479bf97 100644 (file)
@@ -92,8 +92,8 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
 
     //check the status message
     $this->waitForText('crm-notification-container', 'Relationship created.');
-    $this->waitForElementPresent("xpath=//div[@id='contact-summary-relationship-tab']/div[@class='crm-contact-relationship-current']/div/table/tbody/tr/td[9]//span//a[text()='View']");
-    $this->click("xpath=//div[@id='contact-summary-relationship-tab']/div[@class='crm-contact-relationship-current']/div/table/tbody/tr/td[9]//span//a[text()='View']");
+    $this->waitForElementPresent("xpath=//div[@class='crm-contact-relationship-current']/div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]//span//a[text()='View']");
+    $this->click("xpath=//div[@class='crm-contact-relationship-current']/div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]//span//a[text()='View']");
 
     $this->webtestVerifyTabularData(
       array(
index 50483ade16a62175f8c4b12c4e4dc2991be0c409..10b32d45c48a926932fd72713a65827b0334e1ac 100644 (file)
@@ -224,8 +224,8 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase {
     // select group
     $this->select("financial_type_id", "label={$financialType['name']}");
     $this->clickLink("_qf_Search_refresh");
-    $this->assertElementContainsText("xpath=//div[@id='search-status']/table/tbody/tr[1]/td[1]", "2 Result");
-    $this->assertElementContainsText("xpath=//div[@id='search-status']/table/tbody/tr[1]/td[2]", "Financial Type ID In {$financialType['name']}");
+    $this->assertElementContainsText("xpath=//div[@class='crm-content-block']//div[@id='search-status']/table/tbody/tr[1]/td[1]", "2 Result");
+    $this->assertElementContainsText("xpath=//div[@class='crm-content-block']//div[@id='search-status']/table/tbody/tr[1]/td[2]", "Financial Type ID In {$financialType['name']}");
 
     $this->openCiviPage("contact/search/advanced", "reset=1", "_qf_Advanced_refresh-top");
     $this->clickAjaxLink('CiviContribute', "financial_type_id");
@@ -233,8 +233,8 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase {
     // select group
     $this->select("financial_type_id", "label={$financialType['name']}");
     $this->clickLink("_qf_Advanced_refresh-top");
-    $this->assertElementContainsText("xpath=//div[@id='search-status']//table/tbody/tr[1]/td[1]", "2 Contacts");
-    $this->assertElementContainsText("xpath=//div[@id='search-status']//table/tbody/tr[1]/td[2]", "Financial Type ID In {$financialType['name']}");
+    $this->assertElementContainsText("xpath=//div[@class='crm-content-block']//div[@id='search-status']//table/tbody/tr[1]/td[1]", "2 Contacts");
+    $this->assertElementContainsText("xpath=//div[@class='crm-content-block']//div[@id='search-status']//table/tbody/tr[1]/td[2]", "Financial Type ID In {$financialType['name']}");
   }
 
   /**
@@ -271,6 +271,7 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("thankyou_date");
 
     $this->type("note", "This is a test note.");
+    $this->waitForElementPresent("non_deductible_amount");
     $this->type("non_deductible_amount", "10");
     $this->type("fee_amount", "0");
     $this->type("net_amount", "0");
@@ -278,7 +279,7 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase {
     $this->webtestFillDate('thankyou_date');
 
     // Clicking save.
-    $this->clickLink("_qf_Contribution_upload");
+    $this->click("_qf_Contribution_upload");
 
     // Is status message correct?
     $this->checkCRMAlert("The contribution record has been saved.");
index 62aafb7987ed394253d38d5c2cbd5b145bd34356..7dadde372f99c39bbe62016df8d4f7ff931f80ff 100644 (file)
@@ -269,6 +269,7 @@ class WebTest_Event_AddParticipationTest extends CiviSeleniumTestCase {
     $this->click("xpath=//input[@class='crm-form-radio']");
 
     // Enter amount to be paid (note: this should default to selected fee level amount, s/b fixed during 3.2 cycle)
+    $this->waitForElementPresent('total_amount');
     $this->type('total_amount', '800');
 
     // Select payment method = Check and enter chk number