Webtest fix for mailing
authorWeb Access <rohan.katkar@webaccessglobal.com>
Thu, 2 Apr 2015 11:11:02 +0000 (16:41 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Thu, 2 Apr 2015 11:11:02 +0000 (16:41 +0530)
tests/phpunit/WebTest/Mailing/AddMessageTemplateTest.php

index 54db4494531ecea873c27e0c6aa37261d2378093..0ac9ba1b32dbc55c8b2b53896f610689123d2b9d 100644 (file)
@@ -123,7 +123,13 @@ class WebTest_Mailing_AddMessageTemplateTest extends CiviSeleniumTestCase {
     // Because it tends to cause problems, all uses of sleep() must be justified in comments
     // Sleep should never be used for wait for anything to load from the server
     // Justification for this instance: FIXME
-    sleep(5);
+    $this->waitForAjaxContent();
+    $this->select2('s2id_autogen1', "Unsubscribe via web page");
+    $this->select2('s2id_autogen1', "Domain (organization) address");
+    $this->waitForAjaxContent();
+    $this->select2('s2id_autogen3', "Unsubscribe via web page");
+    $this->select2('s2id_autogen3', "Domain (organization) address");
+    $this->waitForAjaxContent();
     $this->click("xpath=//div[@class='preview-popup']//a[text()='Preview as Plain Text']");
     $this->click('subject');