From 000a086ffcfe2ee34e2dac0267f2922705f84948 Mon Sep 17 00:00:00 2001 From: Sudha Bisht Date: Thu, 16 Jul 2015 19:30:48 +0530 Subject: [PATCH] Ckeditor and Import webtest related fix --- tests/phpunit/CiviTest/CiviSeleniumTestCase.php | 4 +--- tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index 41b90aacd4..cc518caba2 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -635,7 +635,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { $this->fireEvent($fieldName, 'focus'); if ($editor == 'CKEditor') { if ($compressed) { - $this->click("{$fieldName}-plain"); + $this->click("xpath=//textarea[@id='{$fieldName}']/../div[1]"); } $this->waitForElementPresent("xpath=//div[@id='cke_{$fieldName}']//iframe"); $this->runScript("CKEDITOR.instances['{$fieldName}'].setData('

{$text}

');"); @@ -1369,7 +1369,6 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { if ($widget) { // fill in step 8 (Widget Settings) - $this->waitForPageToLoad($this->getTimeoutMsec()); $this->click('link=Widgets'); $this->waitForElementPresent('_qf_Widget_next-bottom'); @@ -1389,7 +1388,6 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { if ($pcp) { // fill in step 9 (Enable Personal Campaign Pages) - $this->waitForPageToLoad($this->getTimeoutMsec()); $this->click('link=Personal Campaigns'); $this->waitForElementPresent('_qf_Contribute_next-bottom'); $this->click('pcp_active'); diff --git a/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php b/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php index bca68bcefb..e9fb4b4ebb 100644 --- a/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php +++ b/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php @@ -362,7 +362,7 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase { $this->waitForPageToLoad($this->getTimeoutMsec()); // Check confirmation alert. - $this->assertTrue((bool) preg_match("/^Are you sure you want to Import now[\s\S]$/", $this->getConfirmation())); + $this->assertTrue((bool) preg_match("/^Backing up your database before importing is recommended, as there is no Undo for this. Are you sure you want to Import now[\s\S]$/", $this->getConfirmation())); $this->chooseOkOnNextConfirmation(); $this->waitForPageToLoad($this->getTimeoutMsec()); -- 2.25.1