From 215ed9aa02549fb1fc29ad043ccf4568a2427027 Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Thu, 8 May 2014 19:05:56 +0530 Subject: [PATCH] WebTestFix --- tests/phpunit/WebTest/Contribute/AddPricesetTest.php | 4 ++-- tests/phpunit/WebTest/Contribute/UpdateContributionTest.php | 4 ++-- tests/phpunit/WebTest/Report/RolePermissionReportTest.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/WebTest/Contribute/AddPricesetTest.php b/tests/phpunit/WebTest/Contribute/AddPricesetTest.php index 55000e2308..40682c41d7 100644 --- a/tests/phpunit/WebTest/Contribute/AddPricesetTest.php +++ b/tests/phpunit/WebTest/Contribute/AddPricesetTest.php @@ -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'); diff --git a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php index a7609daf00..b8fb41575f 100644 --- a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php @@ -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."); diff --git a/tests/phpunit/WebTest/Report/RolePermissionReportTest.php b/tests/phpunit/WebTest/Report/RolePermissionReportTest.php index f495203157..904cc8ed2e 100644 --- a/tests/phpunit/WebTest/Report/RolePermissionReportTest.php +++ b/tests/phpunit/WebTest/Report/RolePermissionReportTest.php @@ -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( -- 2.25.1