Fixed webtest for civi-4.6
authorpratikshad <pratiksha.dubey@webaccess.co.in>
Thu, 2 Apr 2015 11:17:43 +0000 (16:47 +0530)
committerpratikshad <pratiksha.dubey@webaccess.co.in>
Wed, 8 Apr 2015 12:35:16 +0000 (18:05 +0530)
tests/phpunit/CiviTest/CiviSeleniumTestCase.php
tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php
tests/phpunit/WebTest/Contact/TaskActionAddToGroupTest.php
tests/phpunit/WebTest/Contribute/UpdateContributionTest.php

index eb040e5448c046d53e5a3fba74d46e37e2708ad5..83b654f622fd6fef5e0b75e459ef849a073a21e9 100644 (file)
@@ -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());
index 80383f684a4763f25f5ffd7d20ea1217adb4fc9f..f7aad33196340a06f38af813a814e8e143ec48b9 100755 (executable)
@@ -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.");
 
index 8f60293ae3dd14b87a3e11b5707411ab22a61a37..00661b583ad482c5fa9333bcafc6d2e218e2562b 100644 (file)
@@ -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");
index 96f59940469a98d4684a1708758630d2cbca9493..35dd1beb71855b6f81847fa30d765091e0a45bf3 100755 (executable)
@@ -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() {