Webtests 4.7 beta1 fixes
authormonishdeb <monish.deb@webaccessglobal.com>
Thu, 12 Nov 2015 14:42:08 +0000 (20:12 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Thu, 12 Nov 2015 14:43:13 +0000 (20:13 +0530)
tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php
tests/phpunit/WebTest/Contribute/OnlineContributionTest.php
tests/phpunit/WebTest/Event/AddEventTest.php
tests/phpunit/WebTest/Generic/CheckDashboardTest.php
tests/phpunit/WebTest/Member/InheritedMembershipTest.php

index 8a980f1cad6a8a7a293f928eb1304f1ecb303db7..7fe677b17626e15c8ea41996b8b3b58e3456dcf2 100644 (file)
@@ -198,14 +198,14 @@ class WebTest_Contact_AdvancedSearchedRelatedContactTest extends CiviSeleniumTes
   /**
    * @param bool $discount
    * @param bool $priceSet
-   * @param int $processorId
+   * @param int|array  $processorIDs
    */
-  public function _testAddFees($discount = FALSE, $priceSet = FALSE, $processorName) {
+  public function _testAddFees($discount = FALSE, $priceSet = FALSE, $processorIDs) {
     // Go to Fees tab
     $this->click("link=Fees");
     $this->waitForElementPresent("_qf_Fee_upload-bottom");
     $this->click("CIVICRM_QFID_1_is_monetary");
-    $this->select2('payment_processor', $processorName, TRUE);
+    $this->select2('payment_processor', $processorIDs, TRUE);
     $this->select("financial_type_id", "value=4");
     if ($priceSet) {
       // get one - TBD
index a87ffe6d2b0aa046fdf8c93410a0ffda910ddf20..59f086fff5ae75a12e46bf6f683d73395640f9c7 100644 (file)
@@ -312,7 +312,7 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase {
 
     //View Contribution Record and verify data
     $expected = array(
-      'From' => "{$email}",
+      'From' => "{$firstName} {$lastName}",
       'Financial Type' => 'Donation',
       $amountLabel => $amountValue,
       'Contribution Status' => 'Completed',
index 5cad3734357763126846cea524ae7c8485402009..628132041564c46a71a4c2c64cb3217906b94ec4 100644 (file)
@@ -913,7 +913,8 @@ WHERE ceft.entity_id = %1 AND ceft.entity_table = 'civicrm_contribution'";
     $this->waitForElementPresent('_qf_Fee_upload-bottom');
     $this->click('CIVICRM_QFID_1_is_monetary');
     $processorName = 'Test Processor';
-    $this->click("xpath=//tr[@class='crm-event-manage-fee-form-block-payment_processor']/td[2]/label[text()='$processorName']");
+    $this->select2('payment_processor', $processorName, TRUE);
+
     $this->select('financial_type_id', 'label=Event Fee');
     $this->type("label[1]", 'Junior Stars');
     $this->type("value[1]", '500.00');
index 4286be0bb65264e82ff363cd153e55cf35ae079a..cf5dc02acb2db9afdbd9f2fe303cdb080d976612 100644 (file)
@@ -86,8 +86,8 @@ class WebTest_Generic_CheckDashboardTest extends CiviSeleniumTestCase {
     $this->waitForTextPresent("$widgetTitle");
 
     // click Full Screen icon and test full screen container
-    $this->waitForElementPresent("css=li#widget-2 a.fullscreen-icon");
-    $this->click("css=li#widget-2 a.fullscreen-icon");
+    $this->waitForElementPresent("css=li#widget-3 a.fa-expand");
+    $this->click("css=li#widget-3 a.fa-expand");
     $this->waitForElementPresent("ui-id-1");
     $this->waitForTextPresent("$widgetTitle");
     // Because it tends to cause problems, all uses of sleep() must be justified in comments
@@ -134,7 +134,7 @@ class WebTest_Generic_CheckDashboardTest extends CiviSeleniumTestCase {
     $this->WebtestAddActivity();
     $widgetTitle = "Activities";
     $widgetEnabledSelector = "contact-activity-selector-dashlet_wrapper";
-    $widgetConfigureID = "2-0";
+    $widgetConfigureID = "3-0";
 
     // now add the widget
     $this->open($this->sboxPath . "civicrm");
index 856cdc761293328d9e7b912241d112cf284c0bfc..826746a54f262383c079326def24dbd49240cc20 100644 (file)
@@ -357,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 crm-ajax-table 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");
 
     // 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 crm-ajax-table 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@href"));
     $expectedMembershipActivityId = $url['queryString']['id'];
 
     // verify membership id with membership activity id
@@ -390,9 +390,9 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
 
     // click through to the activity view screen after edit
     $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");
     $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 dataTable no-footer']/tbody/tr/td[8]/span/a@href"));
     $actualMembershipActivityId1 = $url['queryString']['id'];
 
     // verify membership id and membership activity id with previous one