<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
}
$this->clickLink("xpath=//tr[@id='rowid{$contriIDOff}']/td[11]/span/a[2]", "total_amount", FALSE);
+ $this->waitForAjaxContent();
$this->type("total_amount", "90");
$this->clickLink('_qf_Contribution_upload', '', FALSE);
+ $this->waitForAjaxContent();
+ $this->waitForText('crm-notification-container', "The sum of fee amount and net amount must be equal to total amount");
+ $this->type("net_amount", "90");
+ $this->clickLink('_qf_Contribution_upload', '', FALSE);
// Is status message correct?
$this->waitForText('crm-notification-container', "The contribution record has been saved.");
//Assertions
$actualAmount = $this->_getPremiumActualCost($contId, $to, $from, $cost2, "'civicrm_contribution'");
- $this->assertEquals($actualAmount, NULL, "Verify actual cost for changed premium");
+ $this->assertEquals($actualAmount, $cost2, "Verify actual cost for changed premium");
$deletedAmount = $this->_getPremiumActualCost($contId, $from, $to, $cost, "'civicrm_contribution'");
- $this->assertEquals($deletedAmount, NULL, "Verify actual cost for deleted premium");
+ $this->assertEquals($deletedAmount, $cost, "Verify actual cost for deleted premium");
}
public function testDeletePremium() {
$this->waitForElementPresent("product_name_0");
$this->select('product_name_0', "value=0");
// Clicking save.
- $this->clickLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[7][not(text())]", FALSE);
+ $this->click("_qf_Contribution_upload");
+ $this->waitForElementPresent("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]//span/a[text()='View']");
//Assertions
$actualAmount = $this->_getPremiumActualCost($contId, $from, $to, NULL, "'civicrm_contribution'");
- $this->assertEquals($actualAmount, NULL, "Verify actual cost for deleted premium");
+ $this->assertEquals($actualAmount, $cost, "Verify actual cost for deleted premium");
}
public function testChangePaymentInstrument() {