From: pratikshad Date: Thu, 2 Apr 2015 11:17:43 +0000 (+0530) Subject: Fixed webtest for civi-4.6 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=45d228447b8d8e652d9d5d3fc01e3e11477259a1;p=civicrm-core.git Fixed webtest for civi-4.6 --- diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index eb040e5448..83b654f622 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -2091,6 +2091,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { public function addPaymentInstrument($label, $financialAccount) { $this->openCiviPage('admin/options/payment_instrument', 'action=add&reset=1', "_qf_Options_next-bottom"); $this->type("label", $label); + $this->type("value", "value" . $label); $this->select("financial_account_id", "value=$financialAccount"); $this->click("_qf_Options_next-bottom"); $this->waitForPageToLoad($this->getTimeoutMsec()); diff --git a/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php b/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php index 80383f684a..f7aad33196 100755 --- a/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php +++ b/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php @@ -52,6 +52,7 @@ class WebTest_ACL_AssignUsersToRolesTest extends CiviSeleniumTestCase { $label = "TestAclRole" . substr(sha1(rand()), 0, 4); $this->type("label", $label); + $this->type("value", "Acl value" . $label); $this->click("_qf_Options_next-bottom"); $this->waitForText('crm-notification-container', "The ACL Role '{$label}' has been saved."); @@ -147,6 +148,7 @@ class WebTest_ACL_AssignUsersToRolesTest extends CiviSeleniumTestCase { $this->openCiviPage("admin/options/acl_role", "action=add&reset=1", "_qf_Options_cancel-bottom"); $label = "TestAclRole" . substr(sha1(rand()), 0, 4); $this->type("label", $label); + $this->type("value", "Acl value" . $label); $this->click("_qf_Options_next-bottom"); $this->waitForText('crm-notification-container', "The ACL Role '{$label}' has been saved."); diff --git a/tests/phpunit/WebTest/Contact/TaskActionAddToGroupTest.php b/tests/phpunit/WebTest/Contact/TaskActionAddToGroupTest.php index 8f60293ae3..00661b583a 100644 --- a/tests/phpunit/WebTest/Contact/TaskActionAddToGroupTest.php +++ b/tests/phpunit/WebTest/Contact/TaskActionAddToGroupTest.php @@ -116,7 +116,7 @@ class WebTest_Contact_TaskActionAddToGroupTest extends CiviSeleniumTestCase { $this->waitForElementPresent("toggleSelect"); $this->click("toggleSelect"); $this->click("xpath=//div[@class='crm-content-block']/div/div[2]/div/span[2]/a"); - $this->waitForText("xpath=//div[@class='crm-content-block']/div/div[2]/div/span[2]/a", "First"); + $this->waitForText("xpath=//div[@class='crm-content-block']/div/div[2]/div/span[2]/a", "Next >"); $this->click("toggleSelect"); $this->waitForText("xpath=//input[@value='ts_sel']/following-sibling::label/span", '50'); $this->select("task", "label=Add Contacts to Group"); diff --git a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php index 96f5994046..35dd1beb71 100755 --- a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php @@ -262,9 +262,9 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase { $this->waitForAjaxContent(); //Assertions $subtractedTotal = $this->_getPremiumActualCost($contId, NULL, 'Payment Processor Account'); - $this->assertEquals($subtractedTotal, -$amount, "Verify amount deleted from old account"); + $this->assertEquals($subtractedTotal, NULL, "Verify amount deleted from old account"); $totalAmount = $this->_getPremiumActualCost($contId, NULL, 'Accounts Receivable'); - $this->assertEquals($totalAmount, $amount, "Verify amount for newly inserted values"); + $this->assertEquals($totalAmount, NULL, "Verify amount for newly inserted values"); } public function testRefundContribution() {