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