Core Bugs and Webtest fixes in 4.7beta1
authormonishdeb <monish.deb@webaccessglobal.com>
Mon, 9 Nov 2015 14:57:42 +0000 (20:27 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Mon, 9 Nov 2015 14:57:42 +0000 (20:27 +0530)
CRM/Case/Form/Case.php
CRM/Contribute/Form/Contribution/Main.php
tests/phpunit/WebTest/Case/AddCaseTest.php
tests/phpunit/WebTest/Contribute/OnlineMultiplePaymentProcessorTest.php
tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php
tests/phpunit/WebTest/Mailing/MailingTest.php

index 059fe437c781c1b2c7a524b6aa746f1b189f4257..6d54dbae270d63c3e44f0fb79df27df8f8382589 100644 (file)
@@ -179,15 +179,10 @@ class CRM_Case_Form_Case extends CRM_Core_Form {
     $className::preProcess($this);
     $activityGroupTree = $this->_groupTree;
 
-    if (!$this->_caseTypeId) {
-      $params = CRM_Utils_Request::exportValues();
-      if (isset($params['case_type_id'])) {
-        $this->_caseTypeId = $params['case_type_id'];
-      }
-    }
     // for case custom fields to populate with defaults
     if (!empty($_POST['hidden_custom'])) {
-      CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->_caseTypeId, 1, 'Case', $this->_caseId);
+      $params = CRM_Utils_Request::exportValues();
+      CRM_Custom_Form_CustomData::preProcess($this, NULL, CRM_Utils_Array::value('case_type_id', $params, $this->_caseTypeId), 1, 'Case', $this->_caseId);
       CRM_Custom_Form_CustomData::buildQuickForm($this);
     }
 
index ea99fd3032f2609ca826c420a8278116b13970f8..81995735bdcf718dba445511e29c9e99768eb5dd 100644 (file)
@@ -1039,7 +1039,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
     if (($this->_values['is_pay_later'] &&
         empty($this->_paymentProcessor) &&
         !array_key_exists('hidden_processor', $params)) ||
-      (!empty($params['payment_processor_id']) && $params['payment_processor_id'] == 0)
+      (CRM_Utils_Array::value('payment_processor_id', $params) == 0)
     ) {
       $params['is_pay_later'] = 1;
     }
index 31b111cbae048f49050ada1ec66033189d0777ca..89943c3d29647b7ac89220d95a19c48947585d43 100644 (file)
@@ -190,6 +190,8 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase {
    */
   public function _testVerifyCaseRoles($caseRoles, $creatorName) {
     $id = $this->urlArg('id');
+    $this->click('css=div.crm-case-roles-block div.crm-accordion-header');
+
     $this->waitForElementPresent("xpath=//table[@id='caseRoles-selector-$id']/tbody/tr[4]/td[2]/a");
     // check that expected roles are listed in the Case Roles pane
     foreach ($caseRoles as $role) {
@@ -228,7 +230,7 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase {
     // Probably don't need both tableId and prefix - but good examples for other situations where only one can be used
 
     $this->webtestVerifyTabularData($openCaseData, '', $activityViewTableId);
-    $this->click("xpath=//span[@class='ui-button-icon-primary ui-icon ui-icon-closethick']");
+    $this->click("xpath=//span[@class='ui-button-icon-primary ui-icon fa-times']");
   }
 
   /**
index e2e63971f18110b15f7353010e6f4bc3d6375ca9..5913088d622773be60350504d42dec2c49603b97 100644 (file)
@@ -174,15 +174,15 @@ class WebTest_Contribute_OnlineMultiplePaymentProcessorTest extends CiviSelenium
     $xpath = "xpath=//label[text() = '{$payLaterText}']/preceding-sibling::input[1]";
     $this->click($xpath);
 
-    $this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next-bottom");
+    $this->click("_qf_Main_upload-bottom");
+    $this->waitForElementPresent("xpath=//div[@class='bold pay_later_receipt-section']");
 
     $payLaterInstructionsText = "Pay later instructions $hash";
     $this->verifyText("xpath=//div[@class='bold pay_later_receipt-section']/p", $payLaterInstructionsText);
-
     $this->click("_qf_Confirm_next-bottom");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->verifyText("xpath=//div[@id='help']/div/p", $payLaterInstructionsText);
+    $this->waitForElementPresent("xpath=//div[@class='help']/div/p");
+    $this->verifyText("xpath=//div[@class='help']/div/p", $payLaterInstructionsText);
 
     //login to check contribution
     $this->openCiviPage("contribute/search", "reset=1", 'contribution_date_low');
index c6178f2f4230532f12106035adfe8996b3d8442a..54e4c9d168d2d8930ad9846012dfd0366fc1f1e9 100644 (file)
@@ -458,9 +458,9 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase {
   public function _getImportComponentContactType($component, $contactType) {
     $importComponentMode = array(
       'Event' => array(
-        'Individual' => 'CIVICRM_QFID_1_18',
-        'Household' => 'CIVICRM_QFID_2_20',
-        'Organization' => 'CIVICRM_QFID_4_22',
+        'Individual' => 'CIVICRM_QFID_1_20',
+        'Household' => 'CIVICRM_QFID_2_22',
+        'Organization' => 'CIVICRM_QFID_4_24',
       ),
       'Contribution' => array(
         'Individual' => 'CIVICRM_QFID_1_18',
index fbe077547bc0a3586266408c84552bf315956282..068d3d94dd940a0d9c63452106305cb17980a6ee 100644 (file)
@@ -420,7 +420,8 @@ class WebTest_Mailing_MailingTest extends CiviSeleniumTestCase {
     $summaryInfoLinks = array(
       'Intended Recipients',
       'Successful Deliveries',
-      'Tracked Opens',
+      'Unique Opens', //as per CRM-16506- Fixed and improve mailing stats changes
+      'Total Opens',
       'Click-throughs',
       'Forwards',
       'Replies',
@@ -457,7 +458,7 @@ class WebTest_Mailing_MailingTest extends CiviSeleniumTestCase {
           'Mailing Delivery -' => "Successful",
         ),
       ),
-      'Tracked Opens' => array(
+      'Unique Opens' => array(
         'report' => array('report_name' => 'Mail Opened', 'Mailing' => "Mailing $mailingName Webtest"),
         'search' => array(
           'Mailing Name IN' => "\"Mailing {$mailingName} Webtest",