3 +--------------------------------------------------------------------+
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2018 |
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 +--------------------------------------------------------------------+
27 require_once 'CiviTest/CiviSeleniumTestCase.php';
30 * Class WebTest_Campaign_SurveyUsageScenarioTest
32 class WebTest_Campaign_SurveyUsageScenarioTest
extends CiviSeleniumTestCase
{
34 protected function setUp() {
38 public function testSurveyUsageScenario() {
39 $this->webtestLogin('admin');
42 $title = substr(sha1(rand()), 0, 7);
43 $groupName = $this->WebtestAddGroup();
46 $firstName1 = substr(sha1(rand()), 0, 7);
47 $this->webtestAddContact($firstName1, "Smith", "$firstName1.smith@example.org");
49 // add contact to group
51 $this->click("css=li#tab_group a");
52 $this->waitForElementPresent("css=#group_id option");
55 $this->select("group_id", "label=$groupName");
56 $this->click("_qf_GroupContact_next");
57 $this->waitForElementPresent('link=Remove');
59 $firstName2 = substr(sha1(rand()), 0, 7);
60 $this->webtestAddContact($firstName2, "John", "$firstName2.john@example.org");
62 // add contact to group
64 $this->click("css=li#tab_group a");
65 $this->waitForElementPresent("css=#group_id option");
68 $this->select("group_id", "label=$groupName");
69 $this->click("_qf_GroupContact_next");
70 $this->waitForElementPresent('link=Remove');
72 // Enable CiviCampaign module if necessary
73 $this->enableComponents(array('CiviCampaign'));
75 // add the required permission
76 $this->changePermissions(array('edit-2-administer-civicampaign'));
78 // Log in as normal user
79 $this->webtestLogin();
81 $this->openCiviPage("campaign/add", "reset=1", "_qf_Campaign_upload-bottom");
82 $this->waitForElementPresent('title');
83 $this->type("title", "Campaign $title");
85 // select the campaign type
86 $this->waitForElementPresent('campaign_type_id');
87 $this->select("campaign_type_id", "value=2");
89 // fill in the description
90 $this->type("description", "This is a test campaign");
92 // include groups for the campaign
93 $this->addSelection("includeGroups", "label=$groupName");
94 $this->click("//option[@value=4]");
96 // fill the end date for campaign
97 $this->webtestFillDate("end_date", "+1 year");
99 // select campaign status
100 $this->select("status_id", "value=2");
103 $this->click("_qf_Campaign_upload-bottom");
104 $this->waitForPageToLoad($this->getTimeoutMsec());
106 $this->waitForText('crm-notification-container', "$title");
108 // create a custom data set for activities -> survey
109 $this->openCiviPage('admin/custom/group', "action=add&reset=1", "_qf_Group_next-bottom");
110 // fill in a unique title for the custom group
111 $this->type("title", "Group $title");
113 // select the group this custom data set extends
114 $this->select("extends[0]", "value=Activity");
115 $this->waitForElementPresent("//select[@id='extends_1']");
116 $this->select("//select[@id='extends_1']", "label=Survey");
118 // save the custom group
119 $this->click("_qf_Group_next-bottom");
120 $this->waitForPageToLoad($this->getTimeoutMsec());
122 // add a custom field to the custom group
123 $this->waitForElementPresent('label');
124 $this->type("label", "Field $title");
126 $this->select("data_type[1]", "value=Radio");
128 $this->waitForElementPresent("option_label_1");
130 // create a set of options
131 $this->type("option_label_1", "Option $title 1");
132 $this->type("option_value_1", "1");
134 $this->type("option_label_2", "Option $title 2");
135 $this->type("option_value_2", "2");
137 // save the custom field
138 $this->click("_qf_Field_done-bottom");
140 $this->waitForElementPresent("newCustomField");
141 $this->waitForText('crm-notification-container', "$title");
143 // create a profile for campaign
144 $this->openCiviPage("admin/uf/group/add", "action=add&reset=1", "_qf_Group_next-bottom");
146 // fill in a unique title for the profile
147 $this->type("title", "Profile $title");
150 $this->click("_qf_Group_next-bottom");
152 $this->waitForElementPresent("xpath=//div[@id='crm-main-content-wrapper']/div/div[2]/a/span");
153 $this->click("xpath=//div[@id='crm-main-content-wrapper']/div/div[2]/a/span");
155 // add a profile field for activity
156 $this->waitForElementPresent('field_name[0]');
157 $this->select("field_name[0]", "value=Activity");
158 $this->waitForElementPresent("field_name[1]");
159 $this->select("field_name[1]", "label=Field $title :: Group $title");
161 $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[1]/span[2]");
162 $this->click("xpath=//div[@class='ui-dialog-buttonset']/button[1]/span[2]");
163 $this->waitForText('crm-notification-container', "$title");
166 $this->openCiviPage("survey/add", "reset=1", "_qf_Main_upload-bottom");
168 // fill in a unique title for the survey
169 $this->type("title", "Survey $title");
171 // select the created campaign
172 $this->select("campaign_id", "label=Campaign $title");
174 // select the activity type
175 $this->select("activity_type_id", "label=Survey");
177 // fill in reserve survey respondents
178 $this->type("default_number_of_contacts", 50);
180 // fill in interview survey respondents
181 $this->type("max_number_of_contacts", 100);
184 $this->type("release_frequency", 2);
186 $this->click("_qf_Main_upload-bottom");
187 $this->waitForElementPresent("_qf_Questions_upload_next-bottom");
189 // Select the profile for the survey
190 $this->select("//form[@id='Questions']/div[2]/table/tbody/tr[1]/td[2]/div/div/span/select", "label=New Individual");
192 // select the question created for the survey
194 $this->select("//form[@id='Questions']/div[2]/table/tbody/tr[2]/td[2]/div/div/span/select", "label=Profile $title");
195 $this->click("_qf_Questions_upload_next-bottom");
197 // create a set of options for Survey Responses _qf_Results_upload_done-bottom
198 $this->waitForElementPresent('_qf_Results_upload_done-bottom');
199 $this->type("//input[@id='option_label_1']", "Label $title 1");
200 $this->type("//input[@id='option_value_1']", "1");
202 $this->type("//input[@id='option_label_2']", "Label $title 2");
203 $this->type("//input[@id='option_value_2']", "2");
204 $this->click('_qf_Results_upload_done-bottom');
205 $this->waitForElementPresent("//div[@id='search_form_survey']");
206 $this->waitForText('crm-notification-container', "Results");
208 // Reserve Respondents
209 $this->openCiviPage("survey/search", "reset=1&op=reserve", "_qf_Search_refresh");
211 // search for the respondents
212 $this->select("campaign_survey_id", "label=Survey $title");
214 $this->click("_qf_Search_refresh");
215 $this->waitForElementPresent('toggleSelect');
216 $this->click('toggleSelect');
217 $this->select('task', "Reserve Respondents");
219 $this->waitForElementPresent("_qf_Reserve_done_reserve-bottom");
220 $this->click("_qf_Reserve_done_reserve-bottom");
221 $this->waitForPageToLoad($this->getTimeoutMsec());
222 $this->waitForText('crm-notification-container', "2 contacts have been reserved.");
224 // Interview Respondents
225 $this->openCiviPage("survey/search", "reset=1&op=interview", "_qf_Search_refresh");
226 // search for the respondents
227 $this->waitForElementPresent('campaign_survey_id');
228 $this->select("campaign_survey_id", "label=Survey $title");
229 $this->click("_qf_Search_refresh");
231 $this->waitForElementPresent('toggleSelect');
232 $this->click("xpath=//table[@class='selector row-highlight']/thead/tr/th[1]/input[@id='toggleSelect']");
233 $this->select('task', "Record Survey Responses");
234 $this->waitForElementPresent("_qf_Interview_cancel_interview");
235 $this->select("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[1]/td[@class='result']/select", "value=Label $title 1");
236 $this->click("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[1]/td[9]/a[1]");
238 $this->select("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[2]/td[@class='result']/select", "value=Label $title 2");
239 $this->click("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[2]/td[9]/a[1]");
240 $this->click("_qf_Interview_cancel_interview");
241 $this->waitForPageToLoad($this->getTimeoutMsec());
243 // add a contact to the group to test release respondents
244 $firstName3 = substr(sha1(rand()), 0, 7);
245 $this->webtestAddContact($firstName3, "James", "$firstName3.james@example.org");
246 $id = $this->urlArg('cid');
247 $sortName3 = "James, $firstName3";
249 // add contact to group
251 $this->click("css=li#tab_group a");
252 $this->waitForElementPresent("css=#group_id option");
255 $this->select("group_id", "label=$groupName");
256 $this->click("_qf_GroupContact_next");
257 $this->waitForElementPresent('link=Remove');
259 // Reserve Respondents
260 $this->openCiviPage("survey/search", "reset=1&op=reserve", "_qf_Search_refresh");
262 // search for the respondents
263 $this->select("campaign_survey_id", "label=Survey $title");
265 $this->click("_qf_Search_refresh");
266 $this->waitForElementPresent('toggleSelect');
267 $this->click('toggleSelect');
268 $this->waitForElementPresent('task');
269 $this->select('task', "Reserve Respondents");
270 $this->waitForElementPresent("_qf_Reserve_done_reserve-bottom");
271 $this->click("_qf_Reserve_done_reserve-bottom");
272 $this->waitForText('crm-notification-container', "1 contact has been reserved.");
274 // Release Respondents
275 $this->openCiviPage("survey/search", "reset=1&op=release", "_qf_Search_refresh");
277 // search for the respondents
278 $this->select("campaign_survey_id", "label=Survey $title");
280 $this->click("_qf_Search_refresh");
281 $this->waitForElementPresent('toggleSelect');
282 $this->click('toggleSelect');
283 $this->waitForElementPresent('task');
284 $this->select("task", "label=Release Respondents");
285 $this->waitForElementPresent('_qf_Release_done-bottom');
286 $this->click("_qf_Release_done-bottom");
287 $this->waitForText('crm-notification-container', "released");
289 // check whether contact is available for reserving again
290 $this->openCiviPage("survey/search", "reset=1&op=reserve", "_qf_Search_refresh");
292 // search for the respondents
293 $this->select("campaign_survey_id", "label=Survey $title");
295 $this->waitForElementPresent('_qf_Search_refresh');
296 $this->clickLink("_qf_Search_refresh");
297 $this->waitForText("xpath=//div[@id='search-status']/table/tbody/tr[1]/td[1]", '1 Result');
300 public function testSurveyReportTest() {
301 $this->markTestSkipped('Skipping for now as it works fine locally.');
302 $this->webtestLogin('admin');
304 // Enable CiviCampaign module if necessary
305 $this->enableComponents(array('CiviCampaign'));
307 // add the required permission
308 $this->changePermissions('edit-2-administer-civicampaign');
310 $this->webtestLogin();
313 $title = substr(sha1(rand()), 0, 7);
314 $groupName = $this->WebtestAddGroup();
317 $firstName1 = substr(sha1(rand()), 0, 7);
318 $this->webtestAddContact($firstName1, "Smith", "$firstName1.smith@example.org");
319 $id1 = $this->urlArg('cid');
321 // add contact to group
323 $this->click("css=li#tab_group a");
324 $this->waitForElementPresent('css=#group_id option');
327 $this->select("group_id", "label=$groupName");
328 $this->click("_qf_GroupContact_next");
329 $this->waitForElementPresent('link=Remove');
331 $firstName2 = substr(sha1(rand()), 0, 7);
332 $this->webtestAddContact($firstName2, "John", "$firstName2.john@example.org");
333 $id2 = $this->urlArg('cid');
335 // add contact to group
337 $this->click("css=li#tab_group a");
338 $this->waitForElementPresent('css=#group_id option');
341 $this->select("group_id", "label=$groupName");
342 $this->click("_qf_GroupContact_next");
343 $this->waitForElementPresent('link=Remove');
345 // Create custom group and add custom data fields
346 $this->openCiviPage("admin/custom/group", "reset=1");
348 $this->click("link=Add Set of Custom Fields");
349 $this->waitForElementPresent('_qf_Group_cancel-bottom');
351 $customGroup = "Custom Group $title";
352 $this->type('title', "$customGroup");
353 $this->select('extends[0]', "value=Contact");
354 $this->clickLink('_qf_Group_next-bottom');
355 $this->waitForText('crm-notification-container', $customGroup);
358 $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]");
359 $field1 = "Checkbox $title";
360 $this->type('label', $field1);
361 $this->select('data_type[1]', "value=CheckBox");
362 $this->waitForElementPresent('option_label_2');
364 // add multiple choice options
365 $label1 = "Check $title One";
367 $this->type('option_label_1', $label1);
368 $this->type('option_value_1', $value1);
370 $label2 = "Check $title Two";
372 $this->type('option_label_2', $label2);
373 $this->type('option_value_2', $value2);
375 $this->click("link=another choice");
377 $label3 = "Check $title Three";
379 $this->type('option_label_3', $label3);
380 $this->type('option_value_3', $value3);
382 $this->click("xpath=//*[@id='_qf_Field_done-bottom']");
383 $this->waitForElementPresent('newCustomField');
384 $this->isElementPresent("xpath=//table[@id='options']/tbody//tr/td[1]/span[text()='{$field1}']");
386 // Create a profile for survey
387 $this->openCiviPage("admin/uf/group", "reset=1");
389 $this->click("link=Add Profile");
390 $this->waitForElementPresent('_qf_Group_cancel-bottom');
392 $surveyProfile = "Survey Profile $title";
393 $this->type('title', $surveyProfile);
394 $this->click('_qf_Group_next-bottom');
395 $this->waitForText('crm-notification-container', "Your CiviCRM Profile '$surveyProfile' has been added. You can add fields to this profile now.");
397 // Add fields to the profile
399 $this->waitForElementPresent('field_name[0]');
400 $this->select('field_name[0]', "value=Contact");
401 $this->waitForElementPresent('field_name[1]');
402 $this->select('field_name[1]', "value=phone");
403 $this->click('field_name[1]');
404 $this->select('visibility', "value=Public Pages and Listings");
405 $this->check('is_searchable');
406 $this->check('in_selector');
407 $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[2]/span[2]");
408 $this->click("xpath=//div[@class='ui-dialog-buttonset']/button[2]/span[2]");
410 // Custom Data Fields
411 $this->waitForElementPresent("xpath=//select[@id='field_name_1'][@style='display: none;']");
412 $this->waitForElementPresent('field_name[0]');
413 $this->select('field_name[0]', "value=Contact");
414 $this->waitForElementPresent('field_name[1]');
415 $this->select('field_name[1]', "label=$field1 :: $customGroup");
416 $this->click('field_name[1]');
417 $this->select('visibility', "value=Public Pages and Listings");
418 $this->check('is_searchable');
419 $this->check('in_selector');
420 $this->click("xpath=//div[@class='ui-dialog-buttonset']/button[1]/span[2]");
421 $this->waitForElementPresent("xpath=//table[@id='options']");
422 $this->isElementPresent("xpath=//table[@id='options']/tbody//tr/td[1]/span", $field1);
425 $this->openCiviPage("survey/add", "reset=1", "_qf_Main_upload-bottom");
427 // fill in a unique title for the survey
428 $surveyTitle = "Survey $title";
429 $this->waitForElementPresent('title');
430 $this->type('title', $surveyTitle);
432 // select the created campaign
433 //$this->select("campaign_id", "label=Campaign $title");
435 // select the activity type
436 $this->waitForElementPresent('activity_type_id');
437 $this->select("activity_type_id", "label=Survey");
439 // fill in reserve survey respondents
440 $this->type("default_number_of_contacts", 50);
442 // fill in interview survey respondents
443 $this->type("max_number_of_contacts", 100);
446 $this->waitForElementPresent('release_frequency');
447 $this->type("release_frequency", 2);
449 $this->click("_qf_Main_upload-bottom");
450 $this->waitForElementPresent("_qf_Questions_upload_next-bottom");
452 //Select the profile for the survey
453 $this->select("//form[@id='Questions']/div[2]/table/tbody/tr[1]/td[2]/div/div/span/select", "label=New Individual");
455 // select the question created for the survey
457 $this->select("//form[@id='Questions']/div[2]/table/tbody/tr[2]/td[2]/div/div/span/select", "label=$surveyProfile");
458 $this->click("_qf_Questions_upload_next-bottom");
460 // create a set of options for Survey Responses _qf_Results_upload_done-bottom
461 $this->waitForElementPresent('_qf_Results_upload_done-bottom');
462 $optionLabel1 = "Label $title 1";
463 $this->type("//input[@id='option_label_1']", "$optionLabel1");
464 $this->type("//input[@id='option_value_1']", "1");
466 $optionLabel2 = "Label $title 2";
467 $this->type("//input[@id='option_label_2']", "$optionLabel2");
468 $this->type("//input[@id='option_value_2']", "2");
469 $this->type("//input[@id='report_title']", "Survey $title");
470 $this->click('_qf_Results_upload_done-bottom');
471 $this->waitForElementPresent("//div[@id='search_form_survey']");
472 $this->assertTrue($this->isTextPresent("'Results' have been saved."),
473 "Status message didn't show up after saving survey!"
476 // Reserve Respondents
477 $this->openCiviPage("survey/search", "reset=1&op=reserve", '_qf_Search_refresh');
479 // search for the respondents
481 $this->select('campaign_survey_id', "label=$surveyTitle");
483 // need to wait for Groups field to reload dynamically
484 $this->waitForElementPresent("//select[@id='group']/option[text()='$groupName']");
487 $this->waitForElementPresent('group');
488 $this->click('group');
489 $this->waitForElementPresent('group');
490 $this->select('group', "label=$groupName");
491 $this->click('_qf_Search_refresh');
493 $this->waitForElementPresent('toggleSelect');
494 $this->click('toggleSelect');
495 $this->select('task', "Reserve Respondents");
497 $this->waitForElementPresent('_qf_Reserve_done_reserve-bottom');
499 $this->clickLink('_qf_Reserve_done_reserve-bottom', 'access');
500 $this->waitForText('crm-notification-container', "2 contacts have been reserved.");
502 $this->openCiviPage("report/survey/detail", "reset=1", '_qf_SurveyDetails_submit');
504 // Select columns to be displayed
505 $this->check('fields[survey_id]');
506 $this->check('fields[survey_response]');
507 $this->select('survey_id_value', "label=$surveyTitle");
508 $this->select('status_id_value', "label=Reserved");
509 $this->click('_qf_SurveyDetails_submit');
510 $this->waitForElementPresent('_qf_SurveyDetails_submit_print');
511 $this->assertTrue($this->isTextPresent("Is equal to Reserved"));
513 // commenting out the print assertion as print dialog which appears breaks the webtest
514 // as it is OS-related and cannot be handled through webtest
516 // $this->click('_qf_SurveyDetails_submit_print');
517 // $this->waitForPageToLoad($this->getTimeoutMsec());
519 // $this->assertTrue($this->isTextPresent("Survey Title = $surveyTitle"));
520 // $this->assertTrue($this->isTextPresent("Q1 = $field1"));
521 // $this->assertTrue($this->isTextPresent("$value1 | $value2 | $value3"));
523 // Interview Respondents
524 $this->openCiviPage("survey/search", "reset=1&op=interview", '_qf_Search_refresh');
526 // search for the respondents
528 $this->select('campaign_survey_id', "label=$surveyTitle");
530 // need to wait for Groups field to reload dynamically
531 $this->waitForElementPresent("//select[@id='group']/option[text()='$groupName']");
534 $this->click('group');
535 $this->select('group', "label=$groupName");
536 //$this->waitForElementPresent("xpath=//ul[@id='crmasmList1']/li");
537 $this->click('_qf_Search_refresh');
539 //$this->click("xpath=//*[@class='selector']//tbody//tr[@id='rowid{$id1}']/td[1]");
540 $this->waitForElementPresent("xpath=//table[@class='selector row-highlight']/tbody//tr[@id='rowid{$id1}']/td/input");
541 $this->click("xpath=//table[@class='selector row-highlight']/tbody//tr[@id='rowid{$id1}']/td/input");
542 $this->waitForElementPresent('task');
543 $this->select('task', "Record Survey Responses");
544 $this->waitForElementPresent('_qf_Interview_cancel_interview');
546 $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr[@id='row_{$id1}']/td[6]/input[@type='text']");
548 $this->type("field_{$id1}_phone-Primary-1", 9876543210);
550 $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr[@id='row_{$id1}']/td[7]/input[2]");
551 $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr[@id='row_{$id1}']/td[7]/input[2]");
552 $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr[@id='row_{$id1}']/td[7]/input[4]");
553 $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr[@id='row_{$id1}']/td[7]/input[4]");
555 $this->select("field_{$id1}_result", $optionLabel1);
556 $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr[@id='row_{$id1}']/td[10]/a");
557 $this->click('_qf_Interview_cancel_interview');
558 // Because it tends to cause problems, all uses of sleep() must be justified in comments
559 // Sleep should never be used for wait for anything to load from the server
560 // Justification for this instance: FIXME
561 $this->waitForAjaxContent();
563 $this->openCiviPage("report/survey/detail", "reset=1", '_qf_SurveyDetails_submit');
565 // Select columns to be displayed
566 $this->check('fields[survey_id]');
567 $this->check('fields[survey_response]');
568 $this->select('survey_id_value', "label=$surveyTitle");
569 $this->select('status_id_value', "label=Interviewed");
570 $this->click('_qf_SurveyDetails_submit');
571 $this->waitForElementPresent('_qf_SurveyDetails_submit_print');
572 $this->assertTrue($this->isTextPresent("Is equal to Interviewed"));
574 // commenting out the print assertion as print dialog which appears breaks the webtest
575 // as it is OS-related and cannot be handled through webtest
577 // $this->click('_qf_SurveyDetails_submit_print');
578 // $this->waitForPageToLoad($this->getTimeoutMsec());
580 // $this->assertTrue($this->isTextPresent("Survey Title = $surveyTitle"));
581 // $this->assertTrue($this->isTextPresent("Q1 = $field1"));
582 // $this->assertTrue($this->isTextPresent("$value1"));
584 // use GOTV (campaign/gotv) to mark the respondents as voted
585 $this->openCiviPage("campaign/gotv", "reset=1");
587 // search for the respondents
589 $this->select('campaign_survey_id', "label=$surveyTitle");
590 // need to wait for Groups field to reload dynamically
591 $this->waitForElementPresent("//select[@id='group']/option[text()='$groupName']");
594 $this->click('group');
595 $this->select('group', "label=$groupName");
596 //$this->waitForElementPresent("xpath=//ul[@id='crmasmList1']/li");
597 //$this->click("xpath=//div[@id='search_form_gotv']/div[2]/table/tbody/tr[6]/td/a[text()='Search']");
598 $this->click("link=Search");
600 $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[7]/input");
601 $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[7]/input");
603 // Check title of the activities created
604 $this->openCiviPage("activity/search", "reset=1", '_qf_Search_refresh');
605 $this->waitForElementPresent('activity_survey_id');
606 $this->select('activity_survey_id', "label=$surveyTitle");
607 $this->click('_qf_Search_refresh');
608 $this->waitForElementPresent("xpath=//table[@class='selector row-highlight']");
609 $this->verifyText("xpath=//table[@class='selector row-highlight']/tbody//tr/td[5]/a[text()='Smith, $firstName1']/../../td[3]",
610 preg_quote("$surveyTitle - Respondent Interview")
612 $this->verifyText("xpath=//table[@class='selector row-highlight']/tbody//tr/td[5]/a[text()='John, $firstName2']/../../td[3]",
613 preg_quote("$surveyTitle - Respondent Reservation")