Fixed broken webtest
authorpratikshad <pratiksha.dubey@webaccess.co.in>
Thu, 26 Feb 2015 13:09:39 +0000 (18:39 +0530)
committerpratikshad <pratiksha.dubey@webaccess.co.in>
Thu, 26 Feb 2015 13:09:39 +0000 (18:39 +0530)
tests/phpunit/WebTest/Contribute/StandaloneAddTest.php
tests/phpunit/WebTest/Event/AddParticipationTest.php
tests/phpunit/WebTest/Event/AddPricesetTest.php
tests/phpunit/WebTest/Member/EditMembershipTest.php

index 0dd96e6c2dabc8f934d7f6fe79d2ca612f6058da..fca11c9b131817053686b4149b5220ed17c3e051 100644 (file)
@@ -198,7 +198,7 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase {
     $this->select("financial_type_id", "label={$financialType['name']}");
     $this->clickLink("_qf_Search_refresh");
     $this->assertElementContainsText("xpath=//div[@id='search-status']/table/tbody/tr[1]/td[1]", "2 Result");
-    $this->assertElementContainsText("xpath=//div[@id='search-status']/table/tbody/tr[1]/td[2]", "Financial Type IN {$financialType['name']}");
+    $this->assertElementContainsText("xpath=//div[@id='search-status']/table/tbody/tr[1]/td[2]", "Financial Type ID In {$financialType['name']}");
 
     $this->openCiviPage("contact/search/advanced", "reset=1", "_qf_Advanced_refresh-top");
     $this->clickAjaxLink('CiviContribute', "financial_type_id");
@@ -207,7 +207,7 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase {
     $this->select("financial_type_id", "label={$financialType['name']}");
     $this->clickLink("_qf_Advanced_refresh-top");
     $this->assertElementContainsText("xpath=//div[@id='search-status']//table/tbody/tr[1]/td[1]", "2 Contacts");
-    $this->assertElementContainsText("xpath=//div[@id='search-status']//table/tbody/tr[1]/td[2]", "Financial Type IN {$financialType['name']}");
+    $this->assertElementContainsText("xpath=//div[@id='search-status']//table/tbody/tr[1]/td[2]", "Financial Type ID In {$financialType['name']}");
   }
 
   /**
index 1c26be908eaf44a9f003dafa58e20f13b65450ac..5ac33ac5bf023d03860bbc4605da96f758990f38 100644 (file)
@@ -95,7 +95,7 @@ class WebTest_Event_AddParticipationTest extends CiviSeleniumTestCase {
 
     $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');
+    $this->clickAjaxLink("xpath=//*[@id='Search']/table/tbody/tr[1]/td[8]/span/a[text()='View']", '_qf_ParticipantView_cancel-bottom');
 
     $this->webtestVerifyTabularData(
       array(
@@ -284,7 +284,7 @@ class WebTest_Event_AddParticipationTest extends CiviSeleniumTestCase {
 
     $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');
+    $this->clickAjaxLink("xpath=//*[@id='Search']/table/tbody/tr[1]/td[8]/span/a[text()='View']", '_qf_ParticipantView_cancel-bottom');
 
     $this->webtestVerifyTabularData(
       array(
index 87ef980854cf74027f4ecf2d4d2937ba4b0ad4fd..d49f3936e8298e65add027b17b2bc2c71cefe6d2 100644 (file)
@@ -216,7 +216,6 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase {
     $validStrings = array();
     $fields = array(
       'Full Conference' => 'Text',
-      'Meal Choice' => 'Select',
       'Pre-conference Meetup?' => 'Radio',
       'Evening Sessions' => 'CheckBox',
     );
@@ -263,7 +262,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase {
     $this->click('link=Fees');
     $this->waitForElementPresent('_qf_Fee_upload_done-bottom');
     $this->click('CIVICRM_QFID_1_is_monetary');
-    $this->click("xpath=//tbale[@id='paymentProcessor']/tbody/tr[1]/td[2]/label[text()='$processorName']");
+    $this->click("xpath=//table[@id='paymentProcessor']/tbody/tr[1]/td[2]/label[text()='$processorName']");
     $this->select('financial_type_id', 'label=Event Fee');
     $this->select('price_set_id', 'label=' . $setTitle);
 
@@ -376,7 +375,6 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase {
     $validStrings = array();
     $fields = array(
       'Full Conference' => 'Text',
-      'Meal Choice' => 'Select',
       'Pre-conference Meetup?' => 'Radio',
       'Evening Sessions' => 'CheckBox',
     );
index c22174a794e029c18257c77f552c2a7b78f4cba4..2893075ddb4fc32274c4ec5e05e6191f43bd5f4e 100644 (file)
@@ -91,16 +91,13 @@ class WebTest_Member_EditMembershipTest extends CiviSeleniumTestCase {
     $this->openCiviPage('activity/search', 'reset=1', "_qf_Search_refresh");
 
     $this->type("sort_name", $contactName);
-    $this->click('activity_type_id[35]');
-    $this->click('activity_type_id[36]');
+    $this->select('activity_type_id', 'value=35');
+    $this->select('activity_type_id', 'value=36');
     $this->clickLink("_qf_Search_refresh");
 
-    $this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr[2]/td[2][text()='Change Membership Status']"));
-    $this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr[2]/td[3][text()='Status changed from New to Current']"));
+    $this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr[2]/td[2][text()='Change Membership Type']"));
+    $this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr[2]/td[3][text()='Type changed from {$membershipTypes['membership_type']} to General']"));
     $this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr[2]/td[5]/a[text()='{$contactName}']"));
-    $this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr[3]/td[2][text()='Change Membership Type']"));
-    $this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr[3]/td[3][text()='Type changed from {$membershipTypes['membership_type']} to General']"));
-    $this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr[3]/td[5]/a[text()='{$contactName}']"));
   }
 
 }