3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License along with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
28 require_once 'CiviTest/CiviSeleniumTestCase.php';
31 * Class WebTest_Contribute_UpdateContributionTest
33 class WebTest_Contribute_UpdateContributionTest
extends CiviSeleniumTestCase
{
35 protected function setUp() {
39 public function testChangeContributionAmount() {
40 $this->webtestLogin();
42 //Offline Pay Later Contribution
43 $contact = $this->_testOfflineContribution($amount, "Pending");
45 $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low");
47 $this->type("sort_name", $contact['sort_name']);
48 $this->click("_qf_Search_refresh");
50 $this->waitForElementPresent("xpath=//*[@id='Search']//div[@id='contributionSearch']");
51 $contriIDOff = explode('&', $this->getAttribute("xpath=//div[@id='contributionSearch']//table[@class='selector row-highlight']/tbody/tr[1]//td//span/a[1]@href"));
52 if (!empty($contriIDOff)) {
53 $contriIDOff = substr($contriIDOff[1], (strrpos($contriIDOff[1], '=') +
1));
56 $this->clickLink("xpath=//tr[@id='rowid{$contriIDOff}']//td//span/a[2]", "total_amount", FALSE);
57 $this->waitForAjaxContent();
58 $this->type("total_amount", "90");
59 $this->clickLink('_qf_Contribution_upload', '', FALSE);
60 $this->waitForAjaxContent();
61 $this->waitForText('crm-notification-container', "The sum of fee amount and net amount must be equal to total amount");
62 $this->type("net_amount", "90");
63 $this->clickLink('_qf_Contribution_upload', '', FALSE);
65 // Is status message correct?
66 $this->waitForText('crm-notification-container', "The contribution record has been saved.");
69 $searchParams = array('id' => $contriIDOff);
70 $compareParams = array('total_amount' => '90.00');
72 $lineItemSearchParams = array('entity_id' => $contriIDOff);
73 $lineItemCompareParams = array('line_total' => '90.00');
75 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $searchParams, $compareParams);
76 $this->assertDBCompareValues('CRM_Price_DAO_LineItem', $lineItemSearchParams, $lineItemCompareParams);
78 $total = $this->_getTotalContributedAmount($contriIDOff);
79 $compare = array('total_amount' => $total);
80 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $searchParams, $compare);
82 $amount = $this->_getFinancialItemAmount($contriIDOff);
83 $compare = array('total_amount' => $amount);
84 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $searchParams, $compare);
86 $financialTrxnAmount = $this->_getFinancialTrxnAmount($contriIDOff);
87 $compare = array('total_amount' => $financialTrxnAmount);
88 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $searchParams, $compare);
91 public function testPayLater() {
92 $this->webtestLogin();
94 //Offline Pay Later Contribution
95 $this->_testOfflineContribution($amount, "Pending");
96 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']");
97 $contId = $this->urlArg('id', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
98 $this->clickAjaxLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", '_qf_Contribution_cancel-bottom');
99 $this->select("contribution_status_id", "label=Completed");
100 $this->clickAjaxLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']");
101 $this->checkCRMAlert("The contribution record has been saved.");
104 $search = array('id' => $contId);
105 $compare = array('contribution_status_id' => 1);
106 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $search, $compare);
108 $lineItem = key(CRM_Price_BAO_LineItem
::getLineItems($contId, 'contribution'));
109 $search = array('entity_id' => $lineItem);
110 $compare = array('status_id' => 1);
111 $this->assertDBCompareValues("CRM_Financial_DAO_FinancialItem", $search, $compare);
113 $status = $this->_getPremiumActualCost($contId, 'Accounts Receivable', 'Payment Processor Account', NULL, "'civicrm_contribution'", "ft.status_id as status");
114 $this->assertEquals($status, '1', "Verify Completed Status");
117 public function testChangePremium() {
118 $this->webtestLogin();
120 $to = 'Premiums inventory';
121 $financialType = array(
122 'name' => 'Test Financial' . substr(sha1(rand()), 0, 7),
124 'is_deductible' => 1,
126 $this->addeditFinancialType($financialType);
127 $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td/div[text()='" . $financialType['name'] . "']/../../td[7]/span/a[text()='Accounts']");
128 $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td/div[text()='" . $financialType['name'] . "']/../../td[7]/span/a[text()='Accounts']");
129 $this->waitForElementPresent("xpath=//a[@id='newfinancialTypeAccount']");
130 $this->clickAjaxLink("xpath=//a[@id='newfinancialTypeAccount']", "_qf_FinancialTypeAccount_cancel-botttom");
131 $this->select("account_relationship", "label=Premiums Inventory Account is");
132 $this->waitForElementPresent("xpath=//select[@id='financial_account_id']/option[3][text()='Deposit Bank Account']");
133 $this->select("financial_account_id", "label=$to");
134 $this->clickAjaxLink("_qf_FinancialTypeAccount_next-botttom", "xpath=//a[@id='newfinancialTypeAccount']");
136 $premiumName = 'Premium' . substr(sha1(rand()), 0, 7);
141 $this->openCiviPage("admin/contribute/managePremiums", "action=add&reset=1");
143 $this->addPremium($premiumName, $sku, $amount, $price, $cost, $financialType['name']);
146 $premiumName2 = 'Premium' . substr(sha1(rand()), 0, 7);
151 $this->openCiviPage("admin/contribute/managePremiums", "action=add&reset=1");
152 $this->addPremium($premiumName2, $sku2, $amount2, $price2, $cost2, $financialType['name']);
154 // add contribution with premium
155 $this->openCiviPage("contribute/add", "reset=1&action=add&context=standalone");
157 // create new contact using dialog
158 $this->createDialogContact();
159 // select financial type
160 $this->select("financial_type_id", "value=1");
162 $this->type("total_amount", "100");
163 // fill Premium information
164 $this->clickAjaxLink("xpath=//div[@id='Premium']", "product_name_0");
165 $this->select('product_name_0', "label=$premiumName ( $sku )");
167 $this->clickAjaxLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']");
168 // Is status message correct?
169 $this->checkCRMAlert("The contribution record has been saved.");
170 // verify if Contribution is created
171 //click through to the Contribution edit screen
172 $contId = $this->urlArg('id', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
173 $this->clickAjaxLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", "product_name_0");
175 $this->select('product_name_0', "label=$premiumName2 ( $sku2 )");
177 $this->clickAjaxLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[7][text()='$premiumName2']");
178 $this->checkCRMAlert("The contribution record has been saved.");
181 $actualAmount = $this->_getPremiumActualCost($contId, $to, $from, $cost2, "'civicrm_contribution'");
182 $this->assertEquals($actualAmount, $cost2, "Verify actual cost for changed premium");
184 $deletedAmount = $this->_getPremiumActualCost($contId, $from, $to, $cost, "'civicrm_contribution'");
185 $this->assertEquals($deletedAmount, $cost, "Verify actual cost for deleted premium");
188 public function testDeletePremium() {
189 $this->webtestLogin();
191 $to = 'Premiums inventory';
192 $financialType = array(
193 'name' => 'Test Financial' . substr(sha1(rand()), 0, 7),
195 'is_deductible' => 1,
197 $this->addeditFinancialType($financialType);
198 $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td/div[text()='" . $financialType['name'] . "']/../../td[7]/span/a[text()='Accounts']");
199 $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td/div[text()='" . $financialType['name'] . "']/../../td[7]/span/a[text()='Accounts']");
200 $this->waitForElementPresent("xpath=//a[@id='newfinancialTypeAccount']");
201 $this->clickLink("xpath=//a[@id='newfinancialTypeAccount']", "_qf_FinancialTypeAccount_cancel-botttom", FALSE);
203 $this->select("account_relationship", "label=Premiums Inventory Account is");
204 $this->waitForElementPresent("xpath=//select[@id='financial_account_id']/option[3][text()='Deposit Bank Account']");
205 $this->select("financial_account_id", "label=$to");
206 $this->clickLink("_qf_FinancialTypeAccount_next-botttom", "xpath=//a[@id='newfinancialTypeAccount']", FALSE);
207 $premiumName = 'Premium' . substr(sha1(rand()), 0, 7);
212 $this->openCiviPage("admin/contribute/managePremiums", "action=add&reset=1");
214 $this->addPremium($premiumName, $sku, $amount, $price, $cost, $financialType['name']);
215 // add contribution with premium
216 $this->openCiviPage("contribute/add", "reset=1&action=add&context=standalone");
218 // create new contact using dialog
219 $this->createDialogContact();
220 // select financial type
221 $this->select("financial_type_id", "value=1");
223 $this->type("total_amount", "100");
224 // fill Premium information
225 $this->click("xpath=//div[@id='Premium']");
226 $this->waitForElementPresent("product_name_0");
227 $this->select('product_name_0', "label=$premiumName ( $sku )");
229 $this->clickLink("_qf_Contribution_upload");
230 // Is status message correct?
231 $this->waitForText('crm-notification-container', "The contribution record has been saved.");
232 // verify if Contribution is created
233 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']");
234 //click through to the Contribution edit screen
235 $contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
236 $contId = explode('&', $contId[1]);
237 $contId = $contId[0];
238 $this->clickLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", "_qf_Contribution_upload-bottom", FALSE);
239 $this->waitForElementPresent("product_name_0");
240 $this->select('product_name_0', "value=0");
242 $this->click("_qf_Contribution_upload");
243 $this->waitForElementPresent("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]//span/a[text()='View']");
246 $actualAmount = $this->_getPremiumActualCost($contId, $from, $to, NULL, "'civicrm_contribution'");
247 $this->assertEquals($actualAmount, NULL, "Verify actual cost for deleted premium");
250 public function testChangePaymentInstrument() {
251 $this->webtestLogin();
252 $label = 'TEST' . substr(sha1(rand()), 0, 7);
254 $financialAccount = CRM_Contribute_PseudoConstant
::financialAccount();
255 $to = array_search('Accounts Receivable', $financialAccount);
256 $from = array_search('Deposit Bank Account', $financialAccount);
257 $this->addPaymentInstrument($label, $to);
258 $this->_testOfflineContribution($amount);
259 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']");
260 $this->clickLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", '_qf_Contribution_cancel-bottom', FALSE);
261 $contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
262 $contId = explode('&', $contId[1]);
263 $contId = $contId[0];
264 //change payment processor to newly created value
265 $this->select("payment_instrument_id", "label=$label");
266 $this->clickLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", FALSE);
267 $this->waitForAjaxContent();
269 $subtractedTotal = $this->_getPremiumActualCost($contId, NULL, 'Payment Processor Account');
270 $this->assertEquals($subtractedTotal, -$amount, "Verify amount deleted from old account");
271 $totalAmount = $this->_getPremiumActualCost($contId, NULL, 'Accounts Receivable');
272 $this->assertEquals($totalAmount, $amount, "Verify amount for newly inserted values");
275 public function testRefundContribution() {
276 $this->webtestLogin();
278 $this->_testOfflineContribution($amount);
279 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span//a[text()='Edit']");
280 $this->clickAjaxLink("xpath=//form[@class='CRM_Contribute_Form_Search crm-search-form']/div[2]/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", '_qf_Contribution_cancel-bottom');
281 //Contribution status
282 $this->select("contribution_status_id", "label=Refunded");
283 $contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
284 $contId = explode('&', $contId[1]);
285 $contId = $contId[0];
286 $this->clickAjaxLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[6][text()='Refunded']");
289 $lineItem = key(CRM_Price_BAO_LineItem
::getLineItems($contId, 'contribution'));
290 $search = array('entity_id' => $lineItem);
292 'amount' => '100.00',
295 $this->assertDBCompareValues("CRM_Financial_DAO_FinancialItem", $search, $compare);
296 $amount = $this->_getPremiumActualCost($contId, NULL, 'Payment Processor Account', -100.00, "'civicrm_contribution'");
297 $this->assertEquals($amount, '-100.00', 'Verify Financial Trxn Amount.');
300 public function testCancelPayLater() {
301 $this->webtestLogin();
303 $this->_testOfflineContribution($amount, "Pending");
304 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']");
305 $this->clickLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", '_qf_Contribution_cancel-bottom', FALSE);
306 //Contribution status
307 $this->select("contribution_status_id", "label=Cancelled");
308 $contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
309 $contId = explode('&', $contId[1]);
310 $contId = $contId[0];
311 $this->clickLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", FALSE);
312 $this->waitForText('crm-notification-container', "The contribution record has been saved.");
315 $search = array('id' => $contId);
316 $compare = array('contribution_status_id' => 3);
317 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $search, $compare);
318 $lineItem = key(CRM_Price_BAO_LineItem
::getLineItems($contId, 'contribution'));
320 'amount' => '-100.00',
321 'entity_id' => $lineItem,
324 $items = CRM_Financial_BAO_FinancialItem
::retrieve($itemParams, $defaults);
325 $this->assertEquals($items->amount
, $itemParams['amount'], 'Verify Amount for financial Item');
326 // CRM-17183 - check Financial Trxn in $to_financial_account_id
327 $totalAmount = $this->_getPremiumActualCost($items->id
, NULL, 'Accounts Receivable', "-100.00", "'civicrm_financial_item'");
328 $this->assertEquals($totalAmount, "-$amount", 'Verify Amount for Financial Trxn');
329 $totalAmount = $this->_getPremiumActualCost($contId, NULL, 'Accounts Receivable', "-100.00", "'civicrm_contribution'");
330 $this->assertEquals($totalAmount, "-$amount", 'Verify Amount for Financial Trxn');
333 public function testChangeFinancialType() {
334 $this->webtestLogin();
336 $this->_testOfflineContribution($amount);
337 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']");
338 $this->clickLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", '_qf_Contribution_cancel-bottom', FALSE);
339 //Contribution status
340 $this->select("financial_type_id", "value=3");
341 $contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
342 $contId = explode('&', $contId[1]);
343 $contId = $contId[0];
344 $this->clickLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", FALSE);
345 $this->waitForText('crm-notification-container', "The contribution record has been saved.");
348 $search = array('id' => $contId);
349 $compare = array('financial_type_id' => 3);
350 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $search, $compare);
352 $lineItem = key(CRM_Price_BAO_LineItem
::getLineItems($contId, 'contribution'));
354 'amount' => '-100.00',
355 'entity_id' => $lineItem,
357 $item1 = $item2 = array();
358 CRM_Financial_BAO_FinancialItem
::retrieve($itemParams, $item1);
359 $this->assertEquals($item1['amount'], "-100.00", "Verify Amount for New Financial Item");
360 $itemParams['amount'] = '100.00';
361 CRM_Financial_BAO_FinancialItem
::retrieve($itemParams, $item2);
362 $this->assertEquals($item2['amount'], "100.00", "Verify Amount for New Financial Item");
364 $cValue1 = $this->_getPremiumActualCost($contId, NULL, NULL, "-100.00", "'civicrm_contribution'");
365 $fValue1 = $this->_getPremiumActualCost($item1['id'], NULL, NULL, "-100.00", "'civicrm_financial_item'");
366 $this->assertEquals($cValue1, "-100.00", "Verify Amount");
367 $this->assertEquals($fValue1, "-100.00", "Verify Amount");
368 $cValue2 = $this->_getPremiumActualCost($contId, NULL, NULL, "100.00", "'civicrm_contribution'");
369 $fValue2 = $this->_getPremiumActualCost($item2['id'], NULL, NULL, "100.00", "'civicrm_financial_item'");
370 $this->assertEquals($cValue2, "100.00", "Verify Amount");
371 $this->assertEquals($fValue2, "100.00", "Verify Amount");
375 * @param int $entityId
379 * @param null $entityTable
380 * @param string $select
382 * @return null|string
384 public function _getPremiumActualCost($entityId, $from = NULL, $to = NULL, $cost = NULL, $entityTable = NULL, $select = "ft.total_amount AS amount") {
385 $financialAccount = CRM_Contribute_PseudoConstant
::financialAccount();
388 FROM civicrm_financial_trxn ft
389 INNER JOIN civicrm_entity_financial_trxn eft ON eft.financial_trxn_id = ft.id AND eft.entity_id = {$entityId}";
391 $query .= " AND eft.entity_table = {$entityTable}";
394 $to = array_search($to, $financialAccount);
395 $query .= " AND ft.to_financial_account_id = {$to}";
398 $from = array_search($from, $financialAccount);
399 $query .= " AND ft.from_financial_account_id = {$from}";
402 $query .= " AND eft.amount = {$cost}";
404 $query .= " ORDER BY ft.id DESC LIMIT 1";
405 $result = CRM_Core_DAO
::singleValueQuery($query);
412 * @return null|string
414 public function _getFinancialTrxnAmount($contId) {
416 SUM( ft.total_amount ) AS total
417 FROM civicrm_financial_trxn AS ft
418 LEFT JOIN civicrm_entity_financial_trxn AS ceft ON ft.id = ceft.financial_trxn_id
419 WHERE ceft.entity_table = 'civicrm_contribution'
420 AND ceft.entity_id = {$contId}";
421 $result = CRM_Core_DAO
::singleValueQuery($query);
428 * @return null|string
430 public function _getFinancialItemAmount($contId) {
431 $lineItem = key(CRM_Price_BAO_LineItem
::getLineItems($contId, 'contribution'));
434 FROM civicrm_financial_item
435 WHERE entity_table = 'civicrm_line_item'
436 AND entity_id = {$lineItem}";
437 $result = CRM_Core_DAO
::singleValueQuery($query);
444 * @return null|string
446 public function _getTotalContributedAmount($contId) {
449 FROM civicrm_entity_financial_trxn
450 WHERE entity_table = 'civicrm_contribution'
451 AND entity_id = {$contId}";
452 $result = CRM_Core_DAO
::singleValueQuery($query);
458 * @param string $status
461 public function _testOfflineContribution($amount, $status = "Completed") {
463 $this->openCiviPage("contribute/add", "reset=1&context=standalone", "_qf_Contribution_upload");
465 // create new contact using dialog
466 $contact = $this->createDialogContact();
468 // select financial type
469 $this->select("financial_type_id", "value=1");
471 //Contribution status
472 $this->select("contribution_status_id", "label=$status");
475 $this->type("total_amount", $amount);
477 // select payment instrument type
478 $this->select("payment_instrument_id", "label=Credit Card");
480 $this->type("trxn_id", "P20901X1" . rand(100, 10000));
483 //$this->click('CIVICRM_QFID_3_6');
486 $this->clickLink("_qf_Contribution_upload");
488 // Is status message correct?
489 $this->checkCRMAlert("The contribution record has been saved.");
491 $this->waitForElementPresent("xpath=//form[@class='CRM_Contribute_Form_Search crm-search-form']/div[2]/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span//a[text()='View']");
492 // verify if Membership is created
494 //click through to the Membership view screen
495 $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']");
498 'Financial Type' => 'Donation',
499 'Total Amount' => '100.00',
500 'Contribution Status' => $status,
502 $this->webtestVerifyTabularData($expected);
503 $this->click("_qf_ContributionView_cancel-bottom");