Merge pull request #6987 from xurizaemon/CRM-17212
[civicrm-core.git] / tests / phpunit / WebTest / Pledge / ContactContextPledgePaymentAddTest.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
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
27 require_once 'CiviTest/CiviSeleniumTestCase.php';
28
29 /**
30 * Class WebTest_Pledge_ContactContextPledgePaymentAddTest
31 */
32 class WebTest_Pledge_ContactContextPledgePaymentAddTest extends CiviSeleniumTestCase {
33
34 protected function setUp() {
35 parent::setUp();
36 }
37
38 public function testAddPledgePaymentWithAdjustPledgePaymentSchedule() {
39 $this->webtestLogin();
40 $this->openCiviPage('admin/setting/localization', 'reset=1');
41 $this->select("currencyLimit", "value=FJD");
42 $this->click("add");
43 $this->click("_qf_Localization_next-bottom");
44 $this->waitForPageToLoad($this->getTimeoutMsec());
45
46 // Disable pop-ups for this test. Running test w/ pop-ups causes a spurious failure. dgg
47 $this->enableDisablePopups(FALSE);
48
49 // create unique name
50 $name = substr(sha1(rand()), 0, 7);
51 $firstName = 'Adam' . $name;
52 $lastName = 'Jones' . $name;
53
54 // create new contact
55 $this->webtestAddContact($firstName, $lastName, $firstName . "@example.com");
56
57 // wait for action element
58 $this->waitForElementPresent('crm-contact-actions-link');
59
60 // now add pledge from contact summary
61 $this->click("xpath=//div[@class='crm-actions-ribbon']/ul[@id='actions']/li[@class='crm-contact-activity crm-summary-block']/div/a[@id='crm-contact-actions-link']");
62 $this->waitForElementPresent('crm-contact-actions-list');
63
64 // wait for add pledge link
65 $this->waitForElementPresent('link=Add Pledge');
66
67 $this->click('link=Add Pledge');
68
69 // wait for pledge form to load completely
70 $this->waitForElementPresent('_qf_Pledge_upload-bottom');
71
72 // check contact name on pledge form
73 $this->assertElementContainsText('css=tr.crm-pledge-form-block-displayName', "$firstName $lastName");
74
75 $this->select("currency", "value=FJD");
76 $this->type("amount", "30");
77 $this->type("installments", "3");
78 $this->select("frequency_unit", "value=week");
79 $this->type("frequency_day", "2");
80
81 $this->webtestFillDate('acknowledge_date', 'now');
82 $this->select("financial_type_id", "label=Donation");
83
84 $this->select("contribution_page_id", "value=3");
85
86 //PaymentReminders
87 $this->click("PaymentReminders");
88 $this->waitForElementPresent("additional_reminder_day");
89 $this->type("initial_reminder_day", "4");
90 $this->type("max_reminders", "2");
91 $this->type("additional_reminder_day", "4");
92
93 $this->click("_qf_Pledge_upload-bottom");
94 $this->waitForElementPresent('link=Add Pledge');
95
96 $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
97 $this->waitForElementPresent("xpath=//table[@class='selector row-highlight']//tbody/tr[1]/td[10]/span/a[text()='View']");
98 //click through to the Pledge view screen
99 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
100 $this->waitForElementPresent("_qf_PledgeView_next-bottom");
101 $pledgeDate = date('F jS, Y', strtotime('now'));
102
103 $this->webtestVerifyTabularData(array(
104 'Pledge By' => $firstName . ' ' . $lastName,
105 'Total Pledge Amount' => '$ 30.00',
106 'To be paid in' => '3 installments of $ 10.00 every 1 week(s)',
107 'Payments are due on the' => '2 day of the period',
108 'Pledge Made' => $pledgeDate,
109 'Financial Type' => 'Donation',
110 'Pledge Status' => 'Pending',
111 'Initial Reminder Day' => '4 days prior to schedule date',
112 'Maximum Reminders Send' => 2,
113 'Send additional reminders' => '4 days after the last one sent',
114 )
115 );
116
117 $this->clickLink("_qf_PledgeView_next-bottom", "xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']", FALSE);
118 $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a");
119 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[2]/td[8]/a[text()='Record Payment']");
120 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[2]/td[8]/a[text()='Record Payment']");
121 $this->waitForElementPresent("xpath=//form[@id='Contribution']//table//tbody/tr[3]/td[2]/a[text()='adjust payment amount']");
122 $this->click("xpath=//form[@id='Contribution']//table//tbody/tr[3]/td[2]/a[text()='adjust payment amount']");
123 $this->waitForElementPresent("adjust-option-type");
124 $this->type("total_amount", "5");
125 $this->click("_qf_Contribution_upload");
126
127 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
128 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[1]/span/a");
129
130 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[3]/td[8]/a[text()='Record Payment']");
131 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[3]/td[8]/a[text()='Record Payment']");
132 $this->waitForElementPresent("xpath=//form[@id='Contribution']//table//tbody/tr[3]/td[2]/a[text()='adjust payment amount']");
133 $this->click("xpath=//form[@id='Contribution']//table//tbody/tr[3]/td[2]/a[text()='adjust payment amount']");
134 $this->waitForElementPresent("adjust-option-type");
135 $this->type("total_amount", "10");
136
137 $this->click("_qf_Contribution_upload");
138
139 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
140 //click through to the Pledge view screen
141 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
142 $this->waitForElementPresent("_qf_PledgeView_next-bottom");
143 $pledgeDate = date('F jS, Y', strtotime('now'));
144
145 $this->webtestVerifyTabularData(array(
146 'Pledge By' => $firstName . ' ' . $lastName,
147 'Total Pledge Amount' => '$ 30.00',
148 'To be paid in' => '3 installments of $ 10.00 every 1 week(s)',
149 'Payments are due on the' => '2 day of the period',
150 'Pledge Made' => $pledgeDate,
151 'Financial Type' => 'Donation',
152 'Pledge Status' => 'In Progress',
153 'Initial Reminder Day' => '4 days prior to schedule date',
154 'Maximum Reminders Send' => 2,
155 'Send additional reminders' => '4 days after the last one sent',
156 )
157 );
158
159 $this->clickLink("_qf_PledgeView_next-bottom", "xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']", FALSE);
160 $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a");
161 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[4]/td[8]/a[text()='Record Payment']");
162 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[4]/td[8]/a[text()='Record Payment']");
163 $this->waitForElementPresent("xpath=//form[@id='Contribution']//table//tbody/tr[3]/td[2]/a[text()='adjust payment amount']");
164
165 $this->waitForElementPresent("xpath=//form[@id='Contribution']//table//tbody/tr[3]/td[2]/a[text()='adjust payment amount']");
166 $this->click("xpath=//form[@id='Contribution']//table//tbody/tr[3]/td[2]/a[text()='adjust payment amount']");
167 $this->waitForElementPresent("adjust-option-type");
168 $this->type("total_amount", "10");
169
170 $this->waitForElementPresent("_qf_Contribution_upload");
171 $this->click("_qf_Contribution_upload");
172
173 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
174 $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a");
175
176 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[5]/td[8]/a[text()='Record Payment']");
177 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[5]/td[8]/a[text()='Record Payment']");
178
179 $this->waitForElementPresent("_qf_Contribution_upload");
180 $this->click("_qf_Contribution_upload");
181
182 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
183 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
184
185 $this->waitForElementPresent("_qf_PledgeView_next-bottom");
186 $this->webtestVerifyTabularData(array(
187 'Pledge By' => $firstName . ' ' . $lastName,
188 'Total Pledge Amount' => '$ 30.00',
189 'To be paid in' => '3 installments of $ 10.00 every 1 week(s)',
190 'Payments are due on the' => '2 day of the period',
191 'Pledge Made' => $pledgeDate,
192 'Financial Type' => 'Donation',
193 'Pledge Status' => 'Completed',
194 'Initial Reminder Day' => '4 days prior to schedule date',
195 'Maximum Reminders Send' => 2,
196 'Send additional reminders' => '4 days after the last one sent',
197 )
198 );
199 $this->openCiviPage('admin/setting/localization', 'reset=1');
200 $this->select("currencyLimit", "value=FJD");
201 $this->click("remove");
202 $this->click("_qf_Localization_next-bottom");
203 $this->waitForPageToLoad($this->getTimeoutMsec());
204 // Re-enable pop-ups to leave things in the same state
205 $this->enableDisablePopups(TRUE);
206 }
207
208 public function testAddPledgePaymentWithAdjustTotalPledgeAmount() {
209 $this->webtestLogin();
210 // Disable pop-ups for this test. Running test w/ pop-ups causes a spurious failure. dgg
211 $this->enableDisablePopups(FALSE);
212
213 // create unique name
214 $name = substr(sha1(rand()), 0, 7);
215 $firstName = 'Adam' . $name;
216 $lastName = 'Jones' . $name;
217
218 // create new contact
219 $this->webtestAddContact($firstName, $lastName, $firstName . "@example.com");
220
221 // wait for action element
222 $this->waitForElementPresent('crm-contact-actions-link');
223
224 // now add pledge from contact summary
225 $this->click("xpath=//div[@class='crm-actions-ribbon']/ul[@id='actions']/li[@class='crm-contact-activity crm-summary-block']/div/a[@id='crm-contact-actions-link']");
226 $this->waitForElementPresent('crm-contact-actions-list');
227
228 // wait for add plegde link
229 $this->waitForElementPresent('link=Add Pledge');
230
231 $this->click('link=Add Pledge');
232
233 // wait for pledge form to load completely
234 $this->waitForElementPresent('_qf_Pledge_upload-bottom');
235
236 // check contact name on pledge form
237 $this->assertElementContainsText('css=tr.crm-pledge-form-block-displayName', "$firstName $lastName");
238
239 $this->type("amount", "30");
240 $this->type("installments", "3");
241 $this->select("frequency_unit", "value=week");
242 $this->type("frequency_day", "2");
243
244 $this->webtestFillDate('acknowledge_date', 'now');
245
246 $this->select("contribution_page_id", "value=3");
247
248 //PaymentReminders
249 $this->click("PaymentReminders");
250 $this->waitForElementPresent("additional_reminder_day");
251 $this->type("initial_reminder_day", "4");
252 $this->type("max_reminders", "2");
253 $this->type("additional_reminder_day", "4");
254
255 $this->click("_qf_Pledge_upload-bottom");
256
257 $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
258
259 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
260 //click through to the Pledge view screen
261 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
262 $this->waitForElementPresent("_qf_PledgeView_next-bottom");
263 $pledgeDate = date('F jS, Y', strtotime('now'));
264
265 $this->webtestVerifyTabularData(array(
266 'Pledge By' => $firstName . ' ' . $lastName,
267 'Total Pledge Amount' => '$ 30.00',
268 'To be paid in' => '3 installments of $ 10.00 every 1 week(s)',
269 'Payments are due on the' => '2 day of the period',
270 'Pledge Made' => $pledgeDate,
271 'Financial Type' => 'Donation',
272 'Pledge Status' => 'Pending',
273 'Initial Reminder Day' => '4 days prior to schedule date',
274 'Maximum Reminders Send' => 2,
275 'Send additional reminders' => '4 days after the last one sent',
276 )
277 );
278 $this->clickLink("_qf_PledgeView_next-bottom", "xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']", FALSE);
279 $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[1]/span/a");
280 $this->waitForElementPresent("xpath=//table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td[8]/a[text()='Record Payment']");
281 $this->click("xpath=//table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td[8]/a[text()='Record Payment']");
282 $this->waitForElementPresent("xpath=//form[@id='Contribution']//table//tbody/tr[3]/td[2]/a[text()='adjust payment amount']");
283 $this->click("xpath=//form[@id='Contribution']//table//tbody/tr[3]/td[2]/a[text()='adjust payment amount']");
284 $this->waitForElementPresent("adjust-option-type");
285 $this->waitForElementPresent("CIVICRM_QFID_2_option_type");
286 $this->click("CIVICRM_QFID_2_option_type");
287 $this->type("total_amount", "15");
288 $this->click("_qf_Contribution_upload");
289
290 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
291 $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a");
292
293 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[3]/td[8]/a[text()='Record Payment']");
294 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[3]/td[8]/a[text()='Record Payment']");
295 $this->waitForElementPresent("xpath=//form[@id='Contribution']//table//tbody/tr[3]/td[2]/a[text()='adjust payment amount']");
296 $this->click("xpath=//form[@id='Contribution']//table//tbody/tr[3]/td[2]/a[text()='adjust payment amount']");
297 $this->waitForElementPresent("adjust-option-type");
298 $this->waitForElementPresent("CIVICRM_QFID_2_option_type");
299 $this->click("CIVICRM_QFID_2_option_type");
300 $this->type("total_amount", "15");
301
302 $this->click("_qf_Contribution_upload");
303
304 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
305 //click through to the Pledge view screen
306 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
307 $this->waitForElementPresent("_qf_PledgeView_next-bottom");
308 $pledgeDate = date('F jS, Y', strtotime('now'));
309
310 $this->webtestVerifyTabularData(array(
311 'Pledge By' => $firstName . ' ' . $lastName,
312 'Total Pledge Amount' => '$ 40.00',
313 'To be paid in' => '3 installments of $ 10.00 every 1 week(s)',
314 'Payments are due on the' => '2 day of the period',
315 'Pledge Made' => $pledgeDate,
316 'Financial Type' => 'Donation',
317 'Pledge Status' => 'In Progress',
318 'Initial Reminder Day' => '4 days prior to schedule date',
319 'Maximum Reminders Send' => 2,
320 'Send additional reminders' => '4 days after the last one sent',
321 )
322 );
323
324 $this->clickLink("_qf_PledgeView_next-bottom", "xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']", FALSE);
325 $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a");
326 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[4]/td[8]/a[text()='Record Payment']");
327 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[4]/td[8]/a[text()='Record Payment']");
328
329 $this->waitForElementPresent("_qf_Contribution_upload");
330 $this->click("_qf_Contribution_upload");
331
332 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
333 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
334
335 $this->waitForElementPresent("_qf_PledgeView_next-bottom");
336 $this->webtestVerifyTabularData(array(
337 'Pledge By' => $firstName . ' ' . $lastName,
338 'Total Pledge Amount' => '$ 40.00',
339 'To be paid in' => '3 installments of $ 10.00 every 1 week(s)',
340 'Payments are due on the' => '2 day of the period',
341 'Pledge Made' => $pledgeDate,
342 'Financial Type' => 'Donation',
343 'Pledge Status' => 'Completed',
344 'Initial Reminder Day' => '4 days prior to schedule date',
345 'Maximum Reminders Send' => 2,
346 'Send additional reminders' => '4 days after the last one sent',
347 )
348 );
349 // Re-enable pop-ups to leave things in the same state
350 $this->enableDisablePopups(TRUE);
351 }
352
353 public function testAddPledgePayment() {
354 $this->webtestLogin();
355 // Disable pop-ups for this test. Running test w/ pop-ups causes a spurious failure. dgg
356 $this->enableDisablePopups(FALSE);
357
358 // create unique name
359 $name = substr(sha1(rand()), 0, 7);
360 $firstName = 'Adam' . $name;
361 $lastName = 'Jones' . $name;
362
363 // create new contact
364 $this->webtestAddContact($firstName, $lastName, $firstName . "@example.com");
365
366 // wait for action element
367 $this->waitForElementPresent('crm-contact-actions-link');
368
369 // now add pledge from contact summary
370 $this->click("xpath=//div[@class='crm-actions-ribbon']/ul[@id='actions']/li[@class='crm-contact-activity crm-summary-block']/div/a[@id='crm-contact-actions-link']");
371 $this->waitForElementPresent('crm-contact-actions-list');
372
373 // wait for add plegde link
374 $this->waitForElementPresent('link=Add Pledge');
375
376 $this->click('link=Add Pledge');
377
378 // wait for pledge form to load completely
379 $this->waitForElementPresent('_qf_Pledge_upload-bottom');
380
381 // check contact name on pledge form
382 $this->assertElementContainsText('css=tr.crm-pledge-form-block-displayName', "$firstName $lastName");
383
384 $this->type("amount", "30");
385 $this->type("installments", "3");
386 $this->select("frequency_unit", "value=week");
387 $this->type("frequency_day", "2");
388
389 $this->webtestFillDate('acknowledge_date', 'now');
390
391 $this->select("contribution_page_id", "value=3");
392
393 //PaymentReminders
394 $this->click("PaymentReminders");
395 $this->waitForElementPresent("additional_reminder_day");
396 $this->type("initial_reminder_day", "4");
397 $this->type("max_reminders", "2");
398 $this->type("additional_reminder_day", "4");
399
400 $this->click("_qf_Pledge_upload-bottom");
401
402 $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
403
404 //Add payments
405 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
406 $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a");
407 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[2]/td[8]/a[text()='Record Payment']");
408 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[2]/td[8]/a[text()='Record Payment']");
409 $this->waitForElementPresent("_qf_Contribution_upload");
410 $this->click("_qf_Contribution_upload");
411
412 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
413 $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a");
414 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[3]/td[8]/a[text()='Record Payment']");
415 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[3]/td[8]/a[text()='Record Payment']");
416 $this->waitForElementPresent("_qf_Contribution_upload");
417 $this->click("_qf_Contribution_upload");
418
419 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
420 $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a");
421 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[4]/td[8]/a[text()='Record Payment']");
422 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[4]/td[8]/a[text()='Record Payment']");
423 $this->waitForElementPresent("_qf_Contribution_upload");
424 $this->click("_qf_Contribution_upload");
425
426 $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
427 //click through to the Pledge view screen
428 $this->click("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
429 $this->waitForElementPresent("_qf_PledgeView_next-bottom");
430 $pledgeDate = date('F jS, Y', strtotime('now'));
431
432 $this->webtestVerifyTabularData(array(
433 'Pledge By' => $firstName . ' ' . $lastName,
434 'Total Pledge Amount' => '$ 30.00',
435 'To be paid in' => '3 installments of $ 10.00 every 1 week(s)',
436 'Payments are due on the' => '2 day of the period',
437 'Pledge Made' => $pledgeDate,
438 'Financial Type' => 'Donation',
439 'Pledge Status' => 'Completed',
440 'Initial Reminder Day' => '4 days prior to schedule date',
441 'Maximum Reminders Send' => 2,
442 'Send additional reminders' => '4 days after the last one sent',
443 )
444 );
445 // Re-enable pop-ups to leave things in the same state
446 $this->enableDisablePopups(TRUE);
447 }
448
449 }