WebTestFix
authoratif-shaikh <shaikh388@gmail.com>
Thu, 8 May 2014 13:35:56 +0000 (19:05 +0530)
committeratif-shaikh <shaikh388@gmail.com>
Thu, 8 May 2014 13:35:56 +0000 (19:05 +0530)
tests/phpunit/WebTest/Contribute/AddPricesetTest.php
tests/phpunit/WebTest/Contribute/UpdateContributionTest.php
tests/phpunit/WebTest/Report/RolePermissionReportTest.php

index 55000e23081472bcba92a53c36e3ea98ef26c524..40682c41d7648675caca1be98780c3481eedfd2f 100644 (file)
@@ -576,7 +576,7 @@ class WebTest_Contribute_AddPricesetTest extends CiviSeleniumTestCase {
 
     // select price set items
     $this->select('price_set_id', "label=$setTitle");
-    $this->type("xpath=//input[@class='four crm-form-text required']", "2");
+    $this->type("xpath=//input[@class='four crm-form-text required']", "1");
     $this->click("xpath=//input[@class='crm-form-radio']");
     $this->click("xpath=//input[@class='crm-form-checkbox']");
     // select payment instrument type = Check and enter chk number
@@ -588,7 +588,7 @@ class WebTest_Contribute_AddPricesetTest extends CiviSeleniumTestCase {
 
     $this->webtestFillAutocomplete("{$lastNameSoft}, {$firstNameSoft}", 'soft_credit_contact_id_1');
 
-    $this->type('soft_credit_amount_1', "1");
+    $this->type('soft_credit_amount_1', "65");
     //Additional Detail section
     $this->click('AdditionalDetail');
     $this->waitForElementPresent('thankyou_date');
index a7609daf0006b910eff3d2b2d9933c8666bf7672..b8fb41575f6bc081c3e5ef4bc783caf0ab3bb290 100644 (file)
@@ -46,7 +46,7 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase {
    $this->type("sort_name", "$lastName, $firstName");
    $this->click("_qf_Search_refresh");
 
-   $this->waitForElementPresent("xpath=//div[@class='crm-content-block']//div[@id='contributionSearch']");
+   $this->waitForElementPresent("xpath=//*[@id='Search']//div[@id='contributionSearch']");
    $contriIDOff = explode('&', $this->getAttribute("xpath=//div[@id='contributionSearch']//table[@class='selector row-highlight']/tbody/tr[1]/td[11]/span/a[1]@href"));
    if (!empty($contriIDOff)) {
      $contriIDOff = substr($contriIDOff[1], (strrpos($contriIDOff[1], '=') + 1));
@@ -54,7 +54,7 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase {
 
    $this->clickLink("xpath=//tr[@id='rowid{$contriIDOff}']/td[11]/span/a[2]", "total_amount", FALSE);
    $this->type("total_amount", "90");
-   $this->clickLink('_qf_Contribution_upload');
+   $this->clickLink('_qf_Contribution_upload','',FALSE);
 
    // Is status message correct?
    $this->waitForText('crm-notification-container', "The contribution record has been saved.");
index f49520315756bff4ce0a9a3d4d4c019305c68c1e..904cc8ed2e4748bb2ffa32d0bf0c57d8e27c27e3 100644 (file)
@@ -129,7 +129,7 @@ class WebTest_Report_RolePermissionReportTest extends CiviSeleniumTestCase {
     $this->openCiviPage('report/instance/1', 'reset=1');
 
     //check if the reserved report field is frozen
-    $this->assertTrue($this->isElementPresent("xpath=//div[@id='instanceForm']//table[3]/tbody//tr/td[2]/tt[text()='[ ]']"));
+    $this->assertTrue($this->isElementPresent("xpath=//div[@id='instanceForm']//table[3]/tbody//tr/td[2]/span/tt[text()='[ ]']"));
 
     // let's give full CiviReport permissions.
     $permissions = array(