Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
39de6fd5 | 4 | | CiviCRM version 4.6 | |
6a488035 | 5 | +--------------------------------------------------------------------+ |
e7112fa7 | 6 | | Copyright CiviCRM LLC (c) 2004-2015 | |
6a488035 TO |
7 | +--------------------------------------------------------------------+ |
8 | | This file is a part of CiviCRM. | | |
9 | | | | |
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. | | |
13 | | | | |
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. | | |
18 | | | | |
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 | +--------------------------------------------------------------------+ | |
25 | */ | |
26 | ||
6a488035 | 27 | require_once 'CiviTest/CiviSeleniumTestCase.php'; |
e9479dcf EM |
28 | |
29 | /** | |
30 | * Class WebTest_Member_OnlineMembershipCreateTest | |
31 | */ | |
6a488035 TO |
32 | class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase { |
33 | ||
34 | protected function setUp() { | |
35 | parent::setUp(); | |
36 | } | |
37 | ||
00be9182 | 38 | public function testOnlineMembershipCreate() { |
6a488035 TO |
39 | //check for online contribution and profile listings permissions |
40 | $permissions = array("edit-1-make-online-contributions", "edit-1-profile-listings-and-forms"); | |
41 | $this->changePermissions($permissions); | |
42 | ||
42daf119 CW |
43 | // Log in as normal user |
44 | $this->webtestLogin(); | |
6a488035 TO |
45 | |
46 | // a random 7-char string and an even number to make this pass unique | |
47 | $hash = substr(sha1(rand()), 0, 7); | |
48 | $rand = 2 * rand(2, 50); | |
6a488035 | 49 | |
c3ad8633 CW |
50 | // Use default payment processor |
51 | $processorName = 'Test Processor'; | |
6a488035 TO |
52 | |
53 | // create contribution page with randomized title and default params | |
42daf119 CW |
54 | $amountSection = TRUE; |
55 | $payLater = TRUE; | |
10525e44 | 56 | $allowOtherAmount = FALSE; |
42daf119 CW |
57 | $onBehalf = FALSE; |
58 | $pledges = FALSE; | |
59 | $recurring = FALSE; | |
60 | $memberships = TRUE; | |
61 | $memPriceSetId = NULL; | |
62 | $friend = TRUE; | |
63 | $profilePreId = 1; | |
64 | $profilePostId = NULL; | |
65 | $premiums = TRUE; | |
66 | $widget = FALSE; | |
67 | $pcp = TRUE; | |
6a488035 TO |
68 | $isSeparatePayment = TRUE; |
69 | $contributionTitle = "Title $hash"; | |
42daf119 | 70 | $pageId = $this->webtestAddContributionPage($hash, |
6a488035 TO |
71 | $rand, |
72 | $contributionTitle, | |
73 | array($processorName => 'Dummy'), | |
74 | $amountSection, | |
75 | $payLater, | |
76 | $onBehalf, | |
77 | $pledges, | |
78 | $recurring, | |
79 | $memberships, | |
80 | $memPriceSetId, | |
81 | $friend, | |
82 | $profilePreId, | |
83 | $profilePostId, | |
84 | $premiums, | |
85 | $widget, | |
86 | $pcp, | |
87 | TRUE, | |
88 | FALSE, | |
89 | $isSeparatePayment, | |
90 | TRUE, | |
91 | FALSE | |
92 | ); | |
93 | ||
6a488035 TO |
94 | // create two new membership types |
95 | $memTypeParams1 = $this->webtestAddMembershipType(); | |
42daf119 | 96 | $memTypeTitle1 = $memTypeParams1['membership_type']; |
5c80555f | 97 | $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[1]/div[text()='{$memTypeTitle1}']/../../td[12]/span/a[3]@href")); |
42daf119 | 98 | $memTypeId1 = $memTypeId1[1]; |
6a488035 TO |
99 | |
100 | $memTypeParams2 = $this->webtestAddMembershipType(); | |
42daf119 | 101 | $memTypeTitle2 = $memTypeParams2['membership_type']; |
5c80555f | 102 | $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[1]/div[text()='{$memTypeTitle2}']/../../td[12]/span/a[3]@href")); |
42daf119 | 103 | $memTypeId2 = $memTypeId2[1]; |
6a488035 TO |
104 | |
105 | // edit contribution page memberships tab to add two new membership types | |
1019390e | 106 | $this->openCiviPage("admin/contribute/membership", "reset=1&action=update&id={$pageId}", '_qf_MembershipBlock_next-bottom'); |
6a488035 TO |
107 | $this->click("membership_type_$memTypeId1"); |
108 | $this->click("membership_type_$memTypeId2"); | |
225a8648 | 109 | $this->clickLink('_qf_MembershipBlock_next', '_qf_MembershipBlock_next-bottom'); |
6a488035 | 110 | $text = "'MembershipBlock' information has been saved."; |
6c5f7368 | 111 | $this->waitForText('crm-notification-container', $text); |
76e86fd8 | 112 | |
6a488035 | 113 | //logout |
42daf119 | 114 | $this->webtestLogout(); |
6a488035 TO |
115 | |
116 | // signup for membership 1 | |
117 | $firstName = 'Ma' . substr(sha1(rand()), 0, 4); | |
118 | $lastName = 'An' . substr(sha1(rand()), 0, 7); | |
119 | ||
120 | $this->_testOnlineMembershipSignup($pageId, $memTypeTitle1, $firstName, $lastName, $payLater, $hash); | |
6a488035 TO |
121 | |
122 | // Log in using webtestLogin() method | |
123 | $this->webtestLogin(); | |
124 | ||
125 | //Find Member | |
1019390e | 126 | $this->openCiviPage("member/search", "reset=1", "member_end_date_high"); |
6a488035 | 127 | |
6080c83e | 128 | $this->type("sort_name", "$lastName $firstName"); |
225a8648 | 129 | $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='memberSearch']/table/tbody/tr"); |
6a488035 TO |
130 | $this->click("xpath=//div[@id='memberSearch']/table/tbody/tr/td[11]/span/a[text()='View']"); |
131 | $this->waitForElementPresent("_qf_MembershipView_cancel-bottom"); | |
132 | ||
133 | //View Membership Record | |
134 | $verifyData = array( | |
135 | 'Member' => $firstName . ' ' . $lastName, | |
136 | 'Membership Type' => $memTypeTitle1, | |
137 | 'Source' => 'Online Contribution:' . ' ' . $contributionTitle, | |
138 | ); | |
139 | if ($payLater) { | |
140 | $verifyData['Status'] = 'Pending'; | |
141 | } | |
76e86fd8 CW |
142 | else { |
143 | ||
1019390e PN |
144 | $verifyData['Status'] = 'New'; |
145 | } | |
96e6d962 | 146 | $this->webtestVerifyTabularData($verifyData); |
6a488035 TO |
147 | |
148 | // Click View action link on associated contribution record | |
343688b7 RK |
149 | $this->waitForElementPresent("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[1][text()='View']"); |
150 | $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[1][text()='View']"); | |
151 | $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]"); | |
6a488035 TO |
152 | //View Contribution Record |
153 | $verifyData = array( | |
154 | 'From' => $firstName . ' ' . $lastName, | |
155 | 'Total Amount' => '$ 100.00', | |
156 | ); | |
157 | if ($payLater) { | |
158 | $verifyData['Contribution Status'] = 'Pending : Pay Later'; | |
159 | } | |
1019390e PN |
160 | else { |
161 | $verifyData['Contribution Status'] = 'Completed'; | |
162 | } | |
96e6d962 | 163 | $this->webtestVerifyTabularData($verifyData); |
6a488035 | 164 | |
75339f53 | 165 | //CRM-15735 - verify membership dates gets changed w.r.t receive_date of contribution. |
166 | if ($payLater) { | |
167 | $receiveDate = date('F jS, Y', strtotime("-1 month")); | |
168 | $endDate = date('F jS, Y', strtotime("+1 year -1 month -1 day")); | |
169 | $this->clickAjaxLink("xpath=//button//span[contains(text(),'Edit')]", 'receive_date'); | |
170 | $this->select('contribution_status_id', 'Completed'); | |
171 | $this->webtestFillDate('receive_date', '-1 month'); | |
172 | $this->clickAjaxLink("xpath=//button//span[contains(text(),'Save')]", "xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]"); | |
173 | $updatedData = array( | |
174 | 'Status' => 'New', | |
175 | 'Member Since' => $receiveDate, | |
176 | 'Start date' => $receiveDate, | |
177 | 'End date' => $endDate, | |
178 | ); | |
179 | $this->webtestVerifyTabularData($updatedData); | |
180 | } | |
181 | ||
6a488035 TO |
182 | // CRM-8141 signup for membership 2 with same anonymous user info (should create 2 separate membership records because membership orgs are different) |
183 | //logout | |
42daf119 | 184 | $this->webtestLogout(); |
6a488035 TO |
185 | |
186 | $this->_testOnlineMembershipSignup($pageId, $memTypeTitle2, $firstName, $lastName, $payLater, $hash); | |
6a488035 TO |
187 | |
188 | // Log in using webtestLogin() method | |
189 | $this->webtestLogin(); | |
190 | ||
191 | //Find Member | |
1019390e | 192 | $this->openCiviPage("member/search", "reset=1", "member_end_date_high"); |
6a488035 | 193 | |
6080c83e | 194 | $this->type("sort_name", "$lastName $firstName"); |
6a488035 TO |
195 | $this->click("_qf_Search_refresh"); |
196 | ||
197 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
96e6d962 | 198 | $this->assertElementContainsText('search-status', '2 Results', 'Missing text: ' . '2 Results'); |
6a488035 TO |
199 | } |
200 | ||
4cbe18b8 | 201 | /** |
100fef9d CW |
202 | * @param int $pageId |
203 | * @param int $memTypeId | |
204 | * @param string $firstName | |
205 | * @param string $lastName | |
4cbe18b8 EM |
206 | * @param $payLater |
207 | * @param $hash | |
208 | * @param bool $otherAmount | |
209 | */ | |
4da07767 | 210 | public function _testOnlineMembershipSignup($pageId, $memTypeId, $firstName, $lastName, $payLater, $hash, $otherAmount = FALSE, $amountSection = TRUE) { |
6a488035 | 211 | //Open Live Contribution Page |
1019390e | 212 | $this->openCiviPage("contribute/transact", "reset=1&id=$pageId", "_qf_Main_upload-bottom"); |
6a488035 TO |
213 | // Select membership type 1 |
214 | $this->waitForElementPresent("xpath=//div[@class='crm-section membership_amount-section']/div[2]//span/label"); | |
1019390e | 215 | if ($memTypeId != 'No thank you') { |
6c6e6187 | 216 | $this->click("xpath=//div[@class='crm-section membership_amount-section']/div[2]//div/span/label/span[1][contains(text(),'$memTypeId')]"); |
76e86fd8 CW |
217 | } |
218 | ||
1019390e | 219 | else { |
76e86fd8 CW |
220 | $this->click("xpath=//div[@class='crm-section membership_amount-section']/div[2]//span/label[contains(text(),'$memTypeId')]"); |
221 | ||
1019390e | 222 | } |
4da07767 | 223 | if (!$otherAmount && $amountSection) { |
1019390e PN |
224 | $this->click("xpath=//div[@class='crm-section contribution_amount-section']/div[2]//span/label[text()='No thank you']"); |
225 | } | |
4da07767 | 226 | elseif ($amountSection) { |
1019390e PN |
227 | $this->type("xpath=//div[@class='content other_amount-content']/input", $otherAmount); |
228 | } | |
6a488035 TO |
229 | if ($payLater) { |
230 | $this->click("xpath=//div[@class='crm-section payment_processor-section']/div[2]//label[text()='Pay later label {$hash}']"); | |
231 | } | |
232 | $this->type("email-5", $firstName . "@example.com"); | |
343688b7 | 233 | $this->waitForElementPresent("first_name"); |
6a488035 | 234 | $this->type("first_name", $firstName); |
343688b7 | 235 | $this->waitForElementPresent("last_name"); |
6a488035 TO |
236 | $this->type("last_name", $lastName); |
237 | ||
238 | $streetAddress = "100 Main Street"; | |
343688b7 | 239 | $this->waitForElementPresent("street_address-1"); |
6a488035 TO |
240 | $this->type("street_address-1", $streetAddress); |
241 | $this->type("city-1", "San Francisco"); | |
242 | $this->type("postal_code-1", "94117"); | |
243 | $this->select("country-1", "value=1228"); | |
244 | $this->select("state_province-1", "value=1001"); | |
4da07767 | 245 | if (!$payLater && $amountSection) { |
6a488035 TO |
246 | //Credit Card Info |
247 | $this->select("credit_card_type", "value=Visa"); | |
248 | $this->type("credit_card_number", "4111111111111111"); | |
249 | $this->type("cvv2", "000"); | |
250 | $this->select("credit_card_exp_date[M]", "value=1"); | |
251 | $this->select("credit_card_exp_date[Y]", "value=2020"); | |
252 | ||
253 | //Billing Info | |
343688b7 | 254 | $this->waitForElementPresent("billing_first_name"); |
6a488035 | 255 | $this->type("billing_first_name", $firstName . "billing"); |
343688b7 | 256 | $this->waitForElementPresent("billing_last_name"); |
6a488035 TO |
257 | $this->type("billing_last_name", $lastName . "billing"); |
258 | $this->type("billing_street_address-5", "15 Main St."); | |
259 | $this->type(" billing_city-5", "San Jose"); | |
260 | $this->select("billing_country_id-5", "value=1228"); | |
261 | $this->select("billing_state_province_id-5", "value=1004"); | |
262 | $this->type("billing_postal_code-5", "94129"); | |
263 | } | |
264 | $this->click("_qf_Main_upload-bottom"); | |
6a488035 TO |
265 | $this->waitForElementPresent("_qf_Confirm_next-bottom"); |
266 | ||
267 | $this->click("_qf_Confirm_next-bottom"); | |
268 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
269 | } | |
76e86fd8 | 270 | |
00be9182 | 271 | public function testOnlineMembershipCreateWithContribution() { |
1019390e | 272 | //login with admin credentials & make sure we do have required permissions. |
42daf119 CW |
273 | $permissions = array("edit-1-make-online-contributions", "edit-1-profile-listings-and-forms"); |
274 | $this->changePermissions($permissions); | |
275 | ||
1019390e PN |
276 | $hash = substr(sha1(rand()), 0, 7); |
277 | $rand = 2 * rand(2, 50); | |
c3ad8633 CW |
278 | // Use default payment processor |
279 | $processorName = 'Test Processor'; | |
42daf119 CW |
280 | $amountSection = TRUE; |
281 | $payLater = TRUE; | |
10525e44 | 282 | $allowOtherAmount = TRUE; |
42daf119 CW |
283 | $onBehalf = FALSE; |
284 | $pledges = FALSE; | |
285 | $recurring = FALSE; | |
286 | $memberships = TRUE; | |
287 | $memPriceSetId = NULL; | |
288 | $friend = FALSE; | |
289 | $profilePreId = 1; | |
290 | $profilePostId = NULL; | |
291 | $premiums = FALSE; | |
292 | $widget = FALSE; | |
293 | $pcp = FALSE; | |
1019390e PN |
294 | $isSeparatePayment = FALSE; |
295 | $membershipsRequired = FALSE; | |
42daf119 | 296 | $fixedAmount = FALSE; |
1019390e | 297 | $contributionTitle = "Title $hash"; |
42daf119 | 298 | $pageId = $this->webtestAddContributionPage($hash, |
1019390e PN |
299 | $rand, |
300 | $contributionTitle, | |
301 | array($processorName => 'Dummy'), | |
302 | $amountSection, | |
303 | $payLater, | |
304 | $onBehalf, | |
305 | $pledges, | |
306 | $recurring, | |
307 | $memberships, | |
308 | $memPriceSetId, | |
309 | $friend, | |
310 | $profilePreId, | |
311 | $profilePostId, | |
312 | $premiums, | |
313 | $widget, | |
314 | $pcp, | |
315 | TRUE, | |
316 | FALSE, | |
317 | $isSeparatePayment, | |
318 | TRUE, | |
10525e44 | 319 | $allowOtherAmount, |
1019390e PN |
320 | TRUE, |
321 | 'Donation', | |
322 | $fixedAmount, | |
96e6d962 | 323 | $membershipsRequired |
1019390e PN |
324 | ); |
325 | $firstName = 'Ma' . substr(sha1(rand()), 0, 4); | |
326 | $lastName = 'An' . substr(sha1(rand()), 0, 7); | |
96e6d962 | 327 | |
1019390e | 328 | //logout |
42daf119 | 329 | $this->webtestLogout(); |
96e6d962 | 330 | |
1019390e | 331 | $this->_testOnlineMembershipSignup($pageId, 'No thank you', $firstName, $lastName, FALSE, $hash, 50); |
96e6d962 | 332 | |
1019390e | 333 | // Log in using webtestLogin() method |
96e6d962 | 334 | $this->webtestLogin(); |
1019390e PN |
335 | |
336 | //Find Contribution | |
6c6e6187 | 337 | $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low"); |
1019390e | 338 | |
6080c83e | 339 | $this->type("sort_name", "$lastName $firstName"); |
225a8648 | 340 | $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']"); |
73072f84 | 341 | $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE); |
1019390e PN |
342 | |
343 | //View Contribution Record and verify data | |
344 | $expected = array( | |
345 | 'From' => "{$firstName} {$lastName}", | |
346 | 'Financial Type' => 'Donation', | |
347 | 'Total Amount' => '50.00', | |
348 | 'Contribution Status' => 'Completed', | |
349 | 'Received Into' => 'Deposit Bank Account', | |
350 | 'Source' => "Online Contribution: $contributionTitle", | |
351 | 'Online Contribution Page' => $contributionTitle, | |
352 | ); | |
353 | $this->webtestVerifyTabularData($expected); | |
354 | } | |
96025800 | 355 | |
93ba05e3 | 356 | /** |
5bb12682 | 357 | * CRM-16302 - To check whether membership, contribution are |
358 | * created for free membership signup. | |
8cb616f6 | 359 | */ |
4da07767 | 360 | public function testOnlineMembershipCreateWithZeroContribution() { |
361 | //login with admin credentials & make sure we do have required permissions. | |
362 | $permissions = array("edit-1-make-online-contributions", "edit-1-profile-listings-and-forms"); | |
363 | $this->changePermissions($permissions); | |
364 | ||
365 | $hash = substr(sha1(rand()), 0, 7); | |
366 | $rand = 2 * rand(2, 50); | |
8cb616f6 | 367 | $amountSection = $payLater = $allowOtherAmount = $onBehalf = $pledges = $recurring = FALSE; |
368 | $premiums = $widget = $pcp = $isSeparatePayment = $membershipsRequired = $fixedAmount = $friend = FALSE; | |
4da07767 | 369 | $memberships = TRUE; |
370 | $memPriceSetId = NULL; | |
4da07767 | 371 | $profilePreId = 1; |
372 | $profilePostId = NULL; | |
4da07767 | 373 | $contributionTitle = "Title $hash"; |
374 | $pageId = $this->webtestAddContributionPage($hash, | |
375 | $rand, | |
376 | $contributionTitle, | |
377 | NULL, | |
378 | $amountSection, | |
379 | $payLater, | |
380 | $onBehalf, | |
381 | $pledges, | |
382 | $recurring, | |
383 | $memberships, | |
384 | $memPriceSetId, | |
385 | $friend, | |
386 | $profilePreId, | |
387 | $profilePostId, | |
388 | $premiums, | |
389 | $widget, | |
390 | $pcp, | |
391 | FALSE, | |
392 | FALSE, | |
393 | $isSeparatePayment, | |
394 | FALSE, | |
395 | $allowOtherAmount, | |
396 | TRUE, | |
397 | 'Member Dues', | |
398 | $fixedAmount, | |
399 | $membershipsRequired | |
400 | ); | |
401 | $memTypeParams = $this->webtestAddMembershipType('rolling', 1, 'year', 'no', 0); | |
402 | $memTypeTitle = $memTypeParams['membership_type']; | |
403 | $memTypeId = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[1]/div[text()='{$memTypeTitle}']/../../td[12]/span/a[3]@href")); | |
404 | $memTypeId = $memTypeId[1]; | |
405 | ||
406 | // edit contribution page amounts tab to uncheck real time monetary transaction | |
407 | $this->openCiviPage("admin/contribute/membership", "reset=1&action=update&id={$pageId}", '_qf_MembershipBlock_next-bottom'); | |
408 | $this->click("membership_type_$memTypeId"); | |
409 | $this->clickLink('_qf_MembershipBlock_next', '_qf_MembershipBlock_next-bottom'); | |
410 | $text = "'MembershipBlock' information has been saved."; | |
411 | $this->waitForText('crm-notification-container', $text); | |
412 | $this->click('link=Amounts'); | |
413 | $this->waitForElementPresent('_qf_Amount_cancel-bottom'); | |
414 | $this->click('is_monetary'); | |
415 | $this->clickLink('_qf_Amount_upload_done-bottom'); | |
416 | $text = "'Amount' information has been saved."; | |
417 | $this->waitForText('crm-notification-container', $text); | |
418 | ||
419 | $firstName = 'Ma' . substr(sha1(rand()), 0, 4); | |
420 | $lastName = 'An' . substr(sha1(rand()), 0, 7); | |
421 | ||
422 | //logout | |
423 | $this->webtestLogout(); | |
424 | ||
425 | $this->_testOnlineMembershipSignup($pageId, $memTypeTitle, $firstName, $lastName, $payLater, $hash, $allowOtherAmount, $amountSection); | |
426 | ||
427 | // Log in using webtestLogin() method | |
428 | $this->webtestLogin(); | |
429 | ||
430 | //Find Contribution | |
431 | $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low"); | |
432 | $this->type("sort_name", "$lastName $firstName"); | |
433 | $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']"); | |
434 | $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE); | |
435 | ||
436 | //View Contribution Record and verify data | |
437 | $expected = array( | |
438 | 'From' => "{$firstName} {$lastName}", | |
439 | 'Financial Type' => 'Member Dues', | |
440 | 'Total Amount' => '0.00', | |
441 | 'Contribution Status' => 'Completed', | |
442 | 'Received Into' => 'Deposit Bank Account', | |
443 | 'Source' => "Online Contribution: $contributionTitle", | |
444 | 'Online Contribution Page' => $contributionTitle, | |
445 | ); | |
446 | $this->webtestVerifyTabularData($expected); | |
447 | ||
448 | //Find Member | |
449 | $this->openCiviPage("member/search", "reset=1", "member_end_date_high"); | |
450 | ||
451 | $this->type("sort_name", "$lastName $firstName"); | |
452 | $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='memberSearch']/table/tbody/tr"); | |
453 | $this->click("xpath=//div[@id='memberSearch']/table/tbody/tr/td[11]/span/a[text()='View']"); | |
454 | $this->waitForElementPresent("_qf_MembershipView_cancel-bottom"); | |
455 | ||
456 | //View Membership Record | |
457 | $verifyData = array( | |
458 | 'Member' => $firstName . ' ' . $lastName, | |
459 | 'Membership Type' => $memTypeTitle, | |
460 | 'Source' => 'Online Contribution:' . ' ' . $contributionTitle, | |
461 | 'Status' => 'New', | |
462 | ); | |
463 | ||
464 | $this->webtestVerifyTabularData($verifyData); | |
465 | } | |
466 | ||
42daf119 | 467 | } |