From 054c35226d246ef607cd969c14e7388b13cf21b3 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 23 Sep 2014 13:58:55 -0400 Subject: [PATCH] Webtest fix in CiviMailUtils.php --- tests/phpunit/CiviTest/CiviMailUtils.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviMailUtils.php b/tests/phpunit/CiviTest/CiviMailUtils.php index 4e160927fb..2298cad2b4 100644 --- a/tests/phpunit/CiviTest/CiviMailUtils.php +++ b/tests/phpunit/CiviTest/CiviMailUtils.php @@ -118,14 +118,15 @@ class CiviMailUtils extends PHPUnit_Framework_TestCase { function stop() { if ($this->_webtest) { - // Change outbound mail setting - $this->_ut->openCiviPage('admin/setting/smtp', "reset=1", "_qf_Smtp_next"); - $this->_ut->click('xpath=//input[@name="outBound_option" and @value="' . $this->_outBound_option . '"]'); - $this->_ut->clickLink("_qf_Smtp_next"); - - // Is there supposed to be a status message displayed when outbound email settings are changed? - // assert something? - + if ($this->_outBound_option != CRM_Mailing_Config::OUTBOUND_OPTION_REDIRECT_TO_DB) { + // Change outbound mail setting + $this->_ut->openCiviPage('admin/setting/smtp', "reset=1", "_qf_Smtp_next"); + $this->_ut->click('xpath=//input[@name="outBound_option" and @value="' . $this->_outBound_option . '"]'); + if ($this->_outBound_option != CRM_Mailing_Config::OUTBOUND_OPTION_DISABLED) { + $this->_ut->chooseOkOnNextConfirmation(); + } + $this->_ut->clickLink("_qf_Smtp_next"); + } } else { -- 2.25.1