Removed testTinyMCE testcase and fix for webtest failure
authorSudha Bisht <sudha.bisht@webaccessglobal.com>
Tue, 21 Jul 2015 13:58:57 +0000 (19:28 +0530)
committerSudha Bisht <sudha.bisht@webaccessglobal.com>
Tue, 21 Jul 2015 13:58:57 +0000 (19:28 +0530)
CRM/Contribute/Form/Contribution.php
tests/phpunit/CiviTest/CiviSeleniumTestCase.php
tests/phpunit/WebTest/Contact/SignatureTest.php
tests/phpunit/WebTest/Contribute/OfflineRecurContributionTest.php
tests/phpunit/WebTest/Event/AddPricesetTest.php
tests/phpunit/WebTest/Event/PricesetMaxCountTest.php
tests/phpunit/WebTest/Generic/CheckDashboardTest.php

index 9038c3e947115efa15cb02f9c05948166679fa30..7c4d8a0058d5b30463408e3dff22e248c192aaa4 100644 (file)
@@ -1242,6 +1242,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
       }
     }
     // Send receipt mail.
+    array_unshift($this->statusMessage, ts('The contribution record has been saved.'));
     if ($contribution->id && !empty($this->_params['is_email_receipt'])) {
       $this->_params['trxn_id'] = CRM_Utils_Array::value('trxn_id', $result);
       $this->_params['contact_id'] = $contactID;
index 5629e0609be167f8c50161c9503705c60278ea9c..14f6fffec854619c3b722d7447615c939e6fb9ba 100644 (file)
@@ -852,7 +852,9 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
     elseif ($processorType == 'AuthNet') {
       // FIXME: we 'll need to make a new separate account for testing
       $processorSettings = array(
+        'user_name' => '5ULu56ex',
         'test_user_name' => '5ULu56ex',
+        'password' => '7ARxW575w736eF5p',
         'test_password' => '7ARxW575w736eF5p',
       );
     }
index f3fd2fa29b5ac553f920a6c34f5103b970860803..d7d3a68b9fa171e6ab8869f55764a4062d9991b2 100644 (file)
@@ -35,61 +35,6 @@ class WebTest_Contact_SignatureTest extends CiviSeleniumTestCase {
     parent::setUp();
   }
 
-  /**
-   * Test Signature in TinyMC.
-   */
-  public function testTinyMCE() {
-    $this->webtestLogin();
-
-    $this->openCiviPage('dashboard', 'reset=1', 'crm-recently-viewed');
-    $this->click("//div[@id='crm-recently-viewed']/ul/li/a");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
-    $name = $this->getText("xpath=//div[@class='crm-summary-display_name']");
-
-    // Get contact id from url.
-    $contactId = $this->urlArg('cid');
-
-    // Select Your Editor
-    $this->_selectEditor('TinyMCE');
-
-    $this->openCiviPage("contact/add", "reset=1&action=update&cid=$contactId");
-
-    $this->click("//tr[@id='Email_Block_1']/td[1]/div[3]/div[1]");
-    // HTML format message
-    $signature = 'Contact Signature in html';
-
-    $this->fireEvent('email_1_signature_html', 'focus');
-    $this->fillRichTextField('email_1_signature_html', $signature, 'TinyMCE');
-
-    // TEXT Format Message
-    $this->type('email_1_signature_text', 'Contact Signature in text');
-    $this->click('_qf_Contact_upload_view-top');
-    $this->waitForPageToLoad($this->getTimeoutMsec());
-
-    // Is status message correct?
-    $this->waitForText('crm-notification-container', "Contact Saved");
-
-    // Go for Ckeck Your Editor, Click on Send Mail
-    $this->click("//a[@id='crm-contact-actions-link']/span");
-    // the other test checks this in a popup, we'll try it full-page here
-    $this->clickLinkSuppressPopup('link=Send an Email', "xpath=//body[@id='tinymce']/p[2]");
-
-    $this->click('subject');
-    $subject = 'Subject_' . substr(sha1(rand()), 0, 8);
-    $this->type('subject', $subject);
-
-    // Is signature correct? in Editor
-    $this->_checkSignature('html_message', $signature, 'TinyMCE');
-
-    $this->click('_qf_Email_upload-top');
-
-    // Go for Activity Search
-    $this->_checkActivity($subject, $signature);
-
-    // Set Editor back to default so we don't break other tests
-    $this->_selectEditor('CKEditor');
-  }
-
   /**
    *  Test Signature in CKEditor.
    */
index 0760ae5e8583d78ad3fc0a3b5eab82b6a715eb4a..1eebfe40ddb9dfa1cedacd603bdd387846c49951 100644 (file)
@@ -82,7 +82,7 @@ class WebTest_Contribute_OfflineRecurContributionTest extends CiviSeleniumTestCa
     $this->webtestAddBillingDetails($firstName, $middleName, $lastName);
     $this->click('_qf_Contribution_upload-bottom');
     $this->waitForElementPresent('link=Edit');
-    $this->waitForText('crm-notification-container', "The contribution record has been processed.");
+    $this->waitForText('crm-notification-container', "The contribution record has been saved.");
     // Use Find Contributions to make sure test recurring contribution exists
     $this->openCiviPage("contribute/search", "reset=1", 'contribution_currency_type');
 
index db4e9475c079fabc94ffeda0f94dcf265ed6390e..f2701a793935f42e42fa8a5d1e5a6a40891e6c70 100644 (file)
@@ -280,8 +280,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase {
     $this->check('is_online_registration');
     $this->assertChecked('is_online_registration');
 
-    $this->click('intro_text-plain');
-    $this->fillRichTextField('intro_text', $registerIntro);
+    $this->fillRichTextField('intro_text', $registerIntro, 'CKEditor', TRUE);
 
     // enable confirmation email
     $this->click('CIVICRM_QFID_1_is_email_confirm');
@@ -440,8 +439,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase {
     $this->check('is_online_registration');
     $this->assertChecked('is_online_registration');
 
-    $this->click('intro_text-plain');
-    $this->fillRichTextField('intro_text', $registerIntro);
+    $this->fillRichTextField('intro_text', $registerIntro, 'CKEditor', TRUE);
 
     // enable confirmation email
     $this->click('CIVICRM_QFID_1_is_email_confirm');
index bcfebce4d4a86dea8aaa004ba74d0b4709dce5a2..8671a41eb7de19f095801bfa388fc832ed7f4006 100644 (file)
@@ -1141,8 +1141,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase {
       $this->click('is_multiple_registrations');
     }
 
-    $this->click('intro_text-plain');
-    $this->fillRichTextField('intro_text', 'Fill in all the fields below and click Continue.');
+    $this->fillRichTextField('intro_text', 'Fill in all the fields below and click Continue.', 'CKEditor', TRUE);
 
     // enable confirmation email
     $this->click('CIVICRM_QFID_1_is_email_confirm');
index e5e9fb32d578ccaf3aa2d649a3670997943202ae..d055f3f00ac73689588120c7c703c4a04be778f2 100644 (file)
@@ -149,7 +149,7 @@ class WebTest_Generic_CheckDashboardTest extends CiviSeleniumTestCase {
     }
     else {
       // click 'Delete Activity' link
-      $this->click("//table[@class='contact-activity-selector-dashlet dataTable no-footer']/tbody/tr[1]/td[8]/span//a[text()='Delete']");
+      $this->click("//table[@class='contact-activity-selector-dashlet crm-ajax-table dataTable no-footer']/tbody/tr[1]/td[8]/span//a[text()='Delete']");
     }
     $this->waitForPageToLoad($this->getTimeoutMsec());
     $this->waitForElementPresent("_qf_Activity_next-bottom");