Webtests Fixes
[civicrm-core.git] / tests / phpunit / WebTest / Admin / Form / ScheduleReminderTest.php
index ee1c011e0b416b60cc36bdb894f0e1e552e4d252..6038829e42590c5d5460077ce825f59573f6c3fc 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -43,6 +43,7 @@ class WebTest_Admin_Form_ScheduleReminderTest extends CiviSeleniumTestCase {
 
     // Fill Title
     $title = 'Title' . substr(sha1(rand()), 0, 4);
+    $htmlMessage = "Schedule Reminder Test";
     $this->type('title', $title);
 
     // Fill Entity Details
@@ -60,11 +61,12 @@ class WebTest_Admin_Form_ScheduleReminderTest extends CiviSeleniumTestCase {
     // Fill Subject
     $subject = 'subject' . substr(sha1(rand()), 0, 4);
     $this->type('subject', $subject);
+    $this->waitForElementPresent("html_message");
+    $this->fillRichTextField("html_message", $htmlMessage);
 
     //click on save
     $this->click('_qf_ScheduleReminders_next-bottom');
-    $this->waitForPageToLoad($this->getTimeoutMsec());
-
+    $this->waitForElementPresent("xpath=//div[@id='reminder']/div/table/tbody//tr/td[1]/div[text()='{$title}']/../../td[7]/span/a[text()='Edit']");
     $this->click("xpath=//div[@id='reminder']/div/table/tbody//tr/td[1]/div[text()='{$title}']/../../td[7]/span/a[text()='Edit']");
     $this->waitForElementPresent('_qf_ScheduleReminders_cancel-bottom');