tests fixes
authorWeb Access <rohan.katkar@webaccessglobal.com>
Thu, 17 Dec 2015 14:48:05 +0000 (20:18 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Thu, 17 Dec 2015 14:48:05 +0000 (20:18 +0530)
tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php
tests/phpunit/WebTest/Event/ParticipantCountTest.php
tests/phpunit/WebTest/Pledge/ContactContextPledgePaymentAddTest.php
tests/phpunit/WebTest/Report/AddTest.php

index 941dd52b04de43ca0fbced050f1eef9ecd49a594..1af159cd85f26c9d396f70a299b8bcd31ceee0c2 100644 (file)
@@ -259,8 +259,9 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("financial_type_id");
     $this->type("sort_name", $firstName);
     $this->select('financial_type_id', "label=Donation");
-    $this->clickLink('_qf_Search_refresh', "xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[10]/span//a[text()='View']", FALSE);
-    $this->clickLink("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[10]/span//a[text()='View']", '_qf_ContributionView_cancel-bottom', FALSE);
+    $this->clickLink('_qf_Search_refresh', "xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[10]/span/a[1][text()='View']", FALSE);
+    $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[10]/span/a[1][text()='View']");
+    $this->waitForAjaxContent();
     $expected = array(
       'From' => "{$firstName} {$lastName}",
       'Financial Type' => 'Donation',
@@ -272,8 +273,8 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase {
     //Find Member
     $this->openCiviPage("member/search", "reset=1", 'member_source');
     $this->type('sort_name', "$lastName $firstName");
-    $this->clickLink('_qf_Search_refresh', "xpath=//div[@id='memberSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", FALSE);
-    $this->clickLink("xpath=//div[@id='memberSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", '_qf_MembershipView_cancel-bottom', FALSE);
+    $this->clickLink('_qf_Search_refresh', "xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[11]/span//a[text()='View']", FALSE);
+    $this->clickLink("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[11]/span//a[text()='View']", '_qf_MembershipView_cancel-bottom', FALSE);
 
     //View Membership Record
     $expected = array(
index 3ea4182b65923105043f2cfb7f316db8fa04b89d..0072a69cf4054bd60efaf6ef82e4017ef35cc572 100644 (file)
@@ -286,6 +286,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase {
 
     // Find Participant
     $this->openCiviPage('event/search', 'reset=1', 'participant_fee_amount_low');
+    $this->waitForElementPresent('event_id');
     $this->select2("event_id", $eventTitle);
     $this->click('_qf_Search_refresh');
     $this->waitForPageToLoad($this->getTimeoutMsec());
@@ -311,6 +312,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase {
     $this->type('title', $setTitle);
     $this->check('extends[1]');
     $this->select("css=select.crm-form-select", "label={$financialType}");
+    $this->waitForElementPresent("help_pre");
     $this->type('help_pre', 'This is test priceset.');
 
     $this->assertChecked('is_active', 'Verify that Is Active checkbox is set.');
index f6a31cf4732142a0edf0650f927f04c1389713b1..d883eec0d27e347e3e9bcbe76bdb67328533f849 100644 (file)
@@ -428,9 +428,9 @@ class WebTest_Pledge_ContactContextPledgePaymentAddTest extends CiviSeleniumTest
     $this->waitForElementPresent("_qf_Contribution_upload");
     $this->click("_qf_Contribution_upload");
 
-    $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
+    $this->waitForElementPresent("xpath=//form[@class='CRM_Pledge_Form_Search crm-search-form']/div[2]/table/tbody/tr[1]/td[10]/span/a[text()='View']");
     //click through to the Pledge view screen
-    $this->click("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
+    $this->click("xpath=//form[@class='CRM_Pledge_Form_Search crm-search-form']/div[2]/table/tbody/tr[1]/td[10]/span/a[text()='View']");
     $this->waitForElementPresent("_qf_PledgeView_next-bottom");
     $pledgeDate = date('F jS, Y', strtotime('now'));
 
index d371c31f770038441d0c9c72ab80d0a6b71090c9..d82898c4a3b01aa0e4dce4677f248d93c2fff2b6 100644 (file)
@@ -70,7 +70,7 @@ class WebTest_Report_AddTest extends CiviSeleniumTestCase {
     $this->assertElementContainsText('css=td.crm-report-civicrm_email_email', $emailId, "Email did not found!");
 
     // check criteria
-    $this->click("xpath=//div[@id='mainTabContainer']/ul//li/a[text()='Filters']");
+    $this->click("xpath=//div[@class='crm-report-criteria']/div[@id='mainTabContainer']/ul//li/a[text()='Filters']");
     $this->waitForElementPresent("xpath=//div[@class='crm-submit-buttons']");
 
     // Is Contact Name filter?
@@ -88,7 +88,7 @@ class WebTest_Report_AddTest extends CiviSeleniumTestCase {
     $reportDescription = "New Contact Summary Report";
     $emaiSubject = "Contact Summary Report";
     $emailCC = "tesmail@example.org";
-    $this->click("xpath=//div[@id='mainTabContainer']/ul//li/a[text()='Developer']");
+    $this->click("xpath=//div[@class='crm-report-criteria']/div[@id='mainTabContainer']/ul//li/a[text()='Developer']");
     $this->waitForElementPresent("xpath=//div[@class='crm-submit-buttons']");
     $this->click("_qf_Summary_submit_save");
 
@@ -103,7 +103,7 @@ class WebTest_Report_AddTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent('_qf_Summary_submit_save');
 
     // Fill Email Subject
-    $this->click("xpath=//div[@id='mainTabContainer']/ul//li/a[text()='Email Delivery']");
+    $this->click("xpath=//div[@class='crm-report-criteria']/div[@id='mainTabContainer']/ul//li/a[text()='Email Delivery']");
     $this->waitForAjaxContent();
     $this->type("email_subject", $emaiSubject);
 
@@ -116,7 +116,7 @@ class WebTest_Report_AddTest extends CiviSeleniumTestCase {
     $this->type("email_cc", $emailCC);
 
     // We want navigation menu
-    $this->click("xpath=//div[@id='mainTabContainer']/ul//li/a[text()='Access']");
+    $this->click("xpath=//div[@class='crm-report-criteria']/div[@id='mainTabContainer']/ul//li/a[text()='Access']");
     $this->click("is_navigation");
 
     // Navigation menu under Reports section
@@ -165,7 +165,7 @@ class WebTest_Report_AddTest extends CiviSeleniumTestCase {
     $this->assertEquals("on", $this->getValue("fields[phone]"));
 
     // Check Report settings
-    $this->click("xpath=//div[@id='mainTabContainer']/ul/li[4]/a");
+    $this->click("xpath=//div[@class='crm-report-criteria']/div[@id='mainTabContainer']/ul/li[4]/a");
     $this->waitForElementPresent("title");
 
     // Is correct Report Title?
@@ -176,7 +176,7 @@ class WebTest_Report_AddTest extends CiviSeleniumTestCase {
 
     // Is correct email Subject?
     $this->waitForElementPresent("mainTabContainer");
-    $this->click("xpath=//div[@id='mainTabContainer']/ul/li[5]/a");
+    $this->click("xpath=//div[@class='crm-report-criteria']/div[@id='mainTabContainer']/ul/li[5]/a");
     $this->waitForAjaxContent();
     $this->assertContains($emaiSubject, $this->getValue("email_subject"), "Email Subject expected $emaiSubject");
 
@@ -187,7 +187,7 @@ class WebTest_Report_AddTest extends CiviSeleniumTestCase {
     $this->assertContains($emailCC, $this->getValue("email_cc"), "Email CC expected $emailCC");
 
     // Is Navigation?
-    $this->click("xpath=//div[@id='mainTabContainer']/ul/li[6]/a");
+    $this->click("xpath=//div[@class='crm-report-criteria']/div[@id='mainTabContainer']/ul/li[6]/a");
     $this->assertEquals("on", $this->getValue("is_navigation"));
 
     // Is correct Navigation Parent?