-- webtest fixes(tests that is not listed in biryani and were failing)
authorRavish Nair <ravish.nair@webaccess.co.in>
Fri, 5 Apr 2013 14:19:27 +0000 (19:49 +0530)
committerRavish Nair <ravish.nair@webaccess.co.in>
Fri, 5 Apr 2013 14:19:27 +0000 (19:49 +0530)
tests/phpunit/WebTest/Contact/ContactTagTest.php
tests/phpunit/WebTest/Contact/TaskActionSendMassMailing.php

index 0da7371294423e0e33f6c3330ed3086d7d027d78..f4ba8684900c0b73f1e2b70bb881787ddc650938 100644 (file)
@@ -56,7 +56,7 @@ class WebTest_Contact_ContactTagTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertTrue($this->isTextPresent("The tag '$tagName' has been saved."));
+    $this->waitForText('crm-notification-container', "The tag '$tagName' has been saved.");
 
     // Adding contact
     // We're using Quick Add block on the main page for this.
@@ -72,7 +72,7 @@ class WebTest_Contact_ContactTagTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("css=.success");
 
     // Is status message correct?
-    $this->assertTrue($this->isTextPresent("Saved"));
+    $this->waitForText('crm-notification-container', "Saved");
   }
 
   function testTagSetContact() {
@@ -100,7 +100,7 @@ class WebTest_Contact_ContactTagTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertTrue($this->isTextPresent("The tag '$tagSetName' has been saved."));
+    $this->waitForText('crm-notification-container', "The tag '$tagSetName' has been saved.");
 
     // Adding contact
     // We're using Quick Add block on the main page for this.
@@ -148,7 +148,7 @@ class WebTest_Contact_ContactTagTest extends CiviSeleniumTestCase {
     // Visit contact summary page.
     $this->click("css=div.ac_results-inner li");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertTrue($this->isTextPresent("tagset1, tagset2"));
+    $this->waitForText('tags', "tagset1, tagset2");
   }
 }
 
index 4baf6715fde46a00c7038369117e20ac900c9e00..2b39c09eabc8a6343e8b51d89338521ace028fef 100644 (file)
@@ -47,9 +47,9 @@ class WebTest_Contact_TaskActionSendMassMailing extends CiviSeleniumTestCase {
 
     // Click "check all" box and act on "Add to group" action
     $this->click("//form[@id='Advanced']/div[3]/div/div[2]/table/thead/tr/th[1]/input");
+    $this->waitForText('search-status', "50 Selected records only");
     $this->select("task", "label=Schedule/Send a Mass Mailing");
-    $this->click("Go");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->clickLink("Go");
 
     //-------select recipients----------
 
@@ -77,7 +77,7 @@ class WebTest_Contact_TaskActionSendMassMailing extends CiviSeleniumTestCase {
     $this->type("subject", "Test subject {$mailingName} for Webtest");
 
     // check for default option enabled
-    $this->assertChecked("CIVICRM_QFID_1_4");
+    $this->assertChecked("CIVICRM_QFID_1_upload_type");
 
     // HTML format message
     $HTMLMessage = "This is HTML formatted content for Mailing {$mailingName} Webtest.";
@@ -107,8 +107,8 @@ class WebTest_Contact_TaskActionSendMassMailing extends CiviSeleniumTestCase {
     //----------end New Mailing-------------
 
     //check redirected page to Scheduled and Sent Mailings and  verify for mailing name
-    $this->assertTrue($this->isTextPresent("Scheduled and Sent Mailings"));
-    $this->assertTrue($this->isTextPresent("$mailingName"));
+    $this->waitForText('page-title', "Scheduled and Sent Mailings");
+    $this->waitForText('css=.selector', "$mailingName");
 
     //--------- mail delivery verification---------
 
@@ -119,7 +119,7 @@ class WebTest_Contact_TaskActionSendMassMailing extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // verify undelivered status message
-    $this->assertTrue($this->isTextPresent("Delivery has not yet begun for this mailing. If the scheduled delivery date and time is past, ask the system administrator or technical support contact for your site to verify that the automated mailer task ('cron job') is running - and how frequently."));
+    $this->waitForText("css=.messages", "Delivery has not yet begun for this mailing. If the scheduled delivery date and time is past, ask the system administrator or technical support contact for your site to verify that the automated mailer task \('cron job'\) is running - and how frequently.");
 
     // directly send schedule mailing -- not working right now
     $this->openCiviPage("mailing/queue", "reset=1");