Fixed broken webtest for Event and Gerneric
authorpratikshad <pratiksha.dubey@webaccess.co.in>
Tue, 24 Feb 2015 08:59:23 +0000 (18:59 +1000)
committerpratikshad <pratiksha.dubey@webaccess.co.in>
Tue, 24 Feb 2015 08:59:23 +0000 (18:59 +1000)
tests/phpunit/WebTest/Event/AddParticipationTest.php
tests/phpunit/WebTest/Event/MultiprofileEventTest.php
tests/phpunit/WebTest/Event/ParticipantSearchTest.php
tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php

index a3d3eea370149e32770123efec5245b7a5d4e94c..1c26be908eaf44a9f003dafa58e20f13b65450ac 100644 (file)
@@ -93,7 +93,7 @@ class WebTest_Event_AddParticipationTest extends CiviSeleniumTestCase {
     // Is status message correct?
     $this->checkCRMAlert("Event registration for $displayName has been added");
 
-    $this->waitForElementPresent("xpath=//*[@id='Search']//table/tbody/tr[1]/td[8]/span/a[text()='View']");
+    $this->waitForElementPresent("xpath=//*[@id='Search']//table//tbody/tr[1]/td[8]/span/a[text()='View']");
     //click through to the participant view screen
     $this->clickAjaxLink("xpath=//*[@id='Search']//table/tbody/tr[1]/td[8]/span/a[text()='View']", '_qf_ParticipantView_cancel-bottom');
 
@@ -282,7 +282,7 @@ class WebTest_Event_AddParticipationTest extends CiviSeleniumTestCase {
     // Is status message correct?
     $this->checkCRMAlert("Event registration for $displayName has been added");
 
-    $this->waitForElementPresent("xpath=//*[@id='Search']//table/tbody/tr[1]/td[8]/span/a[text()='View']");
+    $this->waitForElementPresent("xpath=//*[@id='Search']//table//tbody/tr[1]/td[8]/span/a[text()='View']");
     //click through to the participant view screen
     $this->clickAjaxLink("xpath=//*[@id='Search']//table/tbody/tr[1]/td[8]/span/a[text()='View']", '_qf_ParticipantView_cancel-bottom');
 
index a3016cd94936e4e0073e48cfe2486bd41fd3b17d..f3d0e7c66dd834f8388b0a172b2b35f3ead14f69 100644 (file)
@@ -97,8 +97,8 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase {
     $name = $firstName . " " . $lastName;
     $status = 'Registered';
 
-    $this->verifyText("xpath=//form[@id='ParticipantView']/div[2]/table/tbody/tr[1]/td[2]/a", preg_quote($name));
-    $this->verifyText("xpath=//form[@id='ParticipantView']/div[2]/table/tbody/tr[3]/td[2]/a", preg_quote($eventTitle));
+    $this->verifyText("xpath=//form[@id='ParticipantView']/div[2]/table[1]/tbody/tr[1]/td[2]/strong/a", preg_quote($name));
+    $this->verifyText("xpath=//form[@id='ParticipantView']/div[2]/table[1]/tbody/tr[3]/td[2]/a", preg_quote($eventTitle));
     $this->verifyText("xpath=//form[@id='ParticipantView']/div[2]/table/tbody/tr[6]/td[2]", preg_quote($status));
 
     // Find additional  Participant
@@ -110,9 +110,9 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase {
     $name = $participantfname . " " . $participantlname;
     $status = 'Registered';
 
-    $this->verifyText("xpath=//form[@id='ParticipantView']/div[2]/table/tbody/tr[1]/td[2]/a", preg_quote($name));
-    $this->verifyText("xpath=//form[@id='ParticipantView']/div[2]/table/tbody/tr[3]/td[2]/a", preg_quote($eventTitle));
-    $this->verifyText("xpath=//form[@id='ParticipantView']/div[2]/table/tbody/tr[6]/td[2]", preg_quote($status));
+    $this->verifyText("xpath=//form[@id='ParticipantView']/div[2]/table[1]/tbody/tr[1]/td[2]/strong/a", preg_quote($name));
+    $this->verifyText("xpath=//form[@id='ParticipantView']/div[2]/table[1]/tbody/tr[3]/td[2]/a", preg_quote($eventTitle));
+    $this->verifyText("xpath=//form[@id='ParticipantView']/div[2]/table[1]/tbody/tr[6]/td[2]", preg_quote($status));
 
     // delete all custom data
     if (isset($cfId)) {
index b55a8202f59724cd3524110361b6072e73f819ab..35b4663ccfaa6cd5c83cb59332bd9eaa98366096 100644 (file)
@@ -165,7 +165,7 @@ class WebTest_Event_ParticipantSearchTest extends CiviSeleniumTestCase {
       "Start Date - greater than or equal to",
       '...AND...',
       "End Date - less than or equal to",
-      "Event Type - $eventTypeName",
+      "Event Type = $eventTypeName",
       'Select Records:',
       'Edit Search Criteria',
     );
index ac3b7a8792f00d7a73147084e0a986ceb76e01a4..7709947e3871ee5a83cdd7a523aca9fe7b074cd4 100644 (file)
@@ -197,10 +197,7 @@ class WebTest_Generic_GeneralClickAroundTest extends CiviSeleniumTestCase {
     $this->click("css=ul#civicrm-menu li.crm-Mailings");
     $this->clickLink("css=ul#civicrm-menu li.crm-New_Mailing a");
 
-    $this->assertTextPresent("New Mailing");
-    $this->assertElementPresent("name");
-    $this->assertElementPresent("includeGroups");
-    $this->assertElementPresent("excludeGroups");
+    $this->assertTextPresent("Mailing");
   }
 
   public function testConstituentReportSummary() {