Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
39de6fd5 | 4 | | CiviCRM version 4.6 | |
6a488035 | 5 | +--------------------------------------------------------------------+ |
06a1bc01 | 6 | | Copyright CiviCRM LLC (c) 2004-2014 | |
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_Profile_MultiRecordProfileAddTest | |
31 | */ | |
6a488035 TO |
32 | class WebTest_Profile_MultiRecordProfileAddTest extends CiviSeleniumTestCase { |
33 | ||
34 | protected function setUp() { | |
35 | parent::setUp(); | |
36 | } | |
92915c55 | 37 | |
00be9182 | 38 | public function testAdminAddNewProfile() { |
6a488035 | 39 | $this->webtestLogin(); |
a90b085c PJ |
40 | list($id, $profileTitle) = $this->_addNewProfile(); |
41 | $this->_deleteProfile($id, $profileTitle); | |
6a488035 TO |
42 | } |
43 | ||
00be9182 | 44 | public function testUserAddNewProfile() { |
050fb75a PJ |
45 | //add the required permission |
46 | $permissions = array( | |
47 | 'edit-2-profile-listings-and-forms', | |
48 | 'edit-2-access-all-custom-data', | |
21dfd5f5 | 49 | 'edit-2-access-civicrm', |
050fb75a PJ |
50 | ); |
51 | $this->changePermissions($permissions); | |
a90b085c PJ |
52 | list($id, $profileTitle) = $this->_addNewProfile(TRUE, FALSE, TRUE); |
53 | $this->_deleteProfile($id, $profileTitle); | |
6a488035 | 54 | } |
b2552577 | 55 | |
00be9182 | 56 | public function testAddNewNonMultiProfile() { |
6a488035 | 57 | $this->webtestLogin(); |
a90b085c PJ |
58 | list($id, $profileTitle) = $this->_addNewProfile(FALSE); |
59 | $this->_deleteProfile($id, $profileTitle); | |
6a488035 | 60 | } |
b2552577 | 61 | |
00be9182 | 62 | public function testNonSearchableMultiProfile() { |
6a488035 | 63 | $this->webtestLogin(); |
a90b085c PJ |
64 | list($id, $profileTitle) = $this->_addNewProfile(TRUE, TRUE); |
65 | $this->_deleteProfile($id, $profileTitle); | |
6a488035 | 66 | } |
b2552577 | 67 | |
4cbe18b8 EM |
68 | /** |
69 | * @param bool $checkMultiRecord | |
70 | * @param bool $checkSearchable | |
71 | * @param bool $userCheck | |
72 | * | |
73 | * @return array | |
74 | */ | |
00be9182 | 75 | public function _addNewProfile($checkMultiRecord = TRUE, $checkSearchable = FALSE, $userCheck = FALSE) { |
6a488035 | 76 | $params = $this->_testCustomAdd($checkSearchable); |
42daf119 | 77 | |
38bf8139 | 78 | $this->openCiviPage('admin/uf/group', 'reset=1'); |
6a488035 | 79 | |
b2552577 | 80 | $this->click('newCiviCRMProfile-top'); |
6a488035 TO |
81 | $this->waitForElementPresent('_qf_Group_next-bottom'); |
82 | ||
83 | //Name of profile | |
84 | $profileTitle = 'profile_' . substr(sha1(rand()), 0, 7); | |
85 | $this->type('title', $profileTitle); | |
86 | ||
f1690d4a | 87 | $this->click('uf_group_type_Profile'); |
6a488035 | 88 | //profile Used for |
6a488035 TO |
89 | $this->click('uf_group_type_User Account'); |
90 | ||
91 | //Profile Advance Settings | |
92 | $this->click("//form[@id='Group']/div[2]/div[2]/div[1]"); | |
93 | ||
6a488035 TO |
94 | //Drupal user account registration option |
95 | $this->click('CIVICRM_QFID_0_8'); | |
96 | ||
97 | //What to do upon duplicate match | |
98 | $this->click('CIVICRM_QFID_1_4'); | |
99 | ||
100 | //Proximity search options | |
101 | $this->click('CIVICRM_QFID_0_14'); | |
102 | ||
103 | // enable maping for contact | |
104 | $this->click('is_map'); | |
105 | ||
106 | // include a link in the listings to Edit profile fields | |
107 | $this->click('is_edit_link'); | |
108 | ||
109 | //to view contacts' Drupal user account information | |
110 | $this->click('is_uf_link'); | |
111 | ||
112 | //click on save | |
51858dd1 | 113 | $this->clickLink('_qf_Group_next', NULL, TRUE); |
6a488035 TO |
114 | |
115 | //check for profile create | |
6c5f7368 | 116 | $this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now."); |
6a488035 | 117 | |
51858dd1 CW |
118 | $gid = $this->urlArg('gid'); |
119 | ||
92915c55 TO |
120 | $this->openCiviPage('admin/uf/group/field/add', array( |
121 | 'action' => 'add', | |
122 | 'reset' => 1, | |
123 | 'gid' => $gid | |
124 | ), 'field_name[0]'); | |
51858dd1 | 125 | |
6a488035 | 126 | //Add field to profile |
6a488035 TO |
127 | $this->click('field_name[0]'); |
128 | $this->select('field_name[0]', 'value=Contact'); | |
b2552577 | 129 | $this->click("//option[@value='Contact']"); |
6a488035 | 130 | $this->click('field_name_1'); |
92fcb95f | 131 | $this->select('field_name_1', 'label=' . $params['textFieldLabel'] . ' :: ' . $params['customGroupTitle']); |
6a488035 TO |
132 | if ($checkMultiRecord) { |
133 | $this->click('is_multi_summary'); | |
134 | } | |
135 | if (!$checkSearchable) { | |
136 | $this->click('is_searchable'); | |
137 | $this->select('visibility', 'value=Public Pages and Listings'); | |
138 | } | |
139 | else { | |
140 | $this->select('visibility', 'value=User and User Admin Only'); | |
141 | } | |
142 | $this->click('in_selector'); | |
143 | $this->click('is_required'); | |
144 | $this->type('help_post', 'This is help for profile field'); | |
145 | $this->click('_qf_Field_next_new-top'); | |
146 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
147 | $this->click('field_name[0]'); | |
148 | $this->select('field_name[0]', 'value=Contact'); | |
149 | $this->click("//option[@value='Contact']"); | |
150 | $this->click('field_name_1'); | |
92fcb95f | 151 | $this->select('field_name_1', 'label=' . $params['selectFieldLabel'] . ' :: ' . $params['customGroupTitle']); |
6a488035 TO |
152 | if ($checkMultiRecord) { |
153 | $this->click('is_multi_summary'); | |
154 | } | |
155 | $this->select('visibility', 'value=Public Pages and Listings'); | |
156 | $this->click('is_searchable'); | |
157 | $this->click('in_selector'); | |
158 | $this->type('help_post', 'This is help for profile field'); | |
159 | $this->click('_qf_Field_next_new-top'); | |
160 | ||
161 | // Add Contact | |
162 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
163 | $this->click('field_name[0]'); | |
164 | $this->select('field_name[0]', 'value=Student'); | |
165 | $this->click("//option[@value='Student']"); | |
b2552577 | 166 | |
6a488035 TO |
167 | $this->click('field_name_1'); |
168 | $this->select('field_name_1', 'value=first_name'); | |
169 | $this->click('is_multi_summary'); | |
170 | $this->select('visibility', 'value=Public Pages and Listings'); | |
171 | $this->click('is_searchable'); | |
172 | $this->click('in_selector'); | |
173 | $this->type('help_post', 'This is help for profile field'); | |
174 | $this->click('_qf_Field_next_new-top'); | |
175 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
176 | $this->click('field_name[0]'); | |
177 | $this->select('field_name[0]', 'value=Student'); | |
178 | $this->click("//option[@value='Student']"); | |
179 | $this->click('field_name_1'); | |
180 | $this->select('field_name_1', 'value=last_name'); | |
181 | $this->select('visibility', 'value=Public Pages and Listings'); | |
182 | $this->click('is_searchable'); | |
183 | $this->click('in_selector'); | |
184 | $this->type('help_post', 'This is help for profile field'); | |
51858dd1 | 185 | $this->clickLink('_qf_Field_next_new-top'); |
6a488035 | 186 | |
6a488035 TO |
187 | $this->click('field_name[0]'); |
188 | $this->select('field_name[0]', 'value=Contact'); | |
189 | $this->click("//option[@value='Contact']"); | |
190 | $this->click('field_name_1'); | |
191 | $this->select('field_name_1', 'value=email'); | |
192 | $this->select('visibility', 'value=Public Pages and Listings'); | |
193 | $this->click('is_searchable'); | |
194 | $this->type('help_post', 'This is help for profile field'); | |
51858dd1 | 195 | $this->clickLink('_qf_Field_next'); |
6a488035 | 196 | |
f1690d4a | 197 | $uselink = explode('?', $this->getAttribute("xpath=//*[@id='field_page']/div[1]/a[4]@href")); |
51858dd1 | 198 | $this->openCiviPage('profile/create', "$uselink[1]", '_qf_Edit_next'); |
6a488035 TO |
199 | $recordNew = $this->_addRecords('Create'); |
200 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
9c7c904f | 201 | |
51858dd1 | 202 | $id = $this->urlArg('id'); |
b2552577 | 203 | |
6a488035 | 204 | if ($userCheck) { |
b2552577 PJ |
205 | //add drupal user |
206 | $this->openCiviPage('contact/view/useradd', "reset=1&action=add&cid=$id", 'cms_name'); | |
6a488035 TO |
207 | $this->type('cms_name', $recordNew['firstname']); |
208 | $this->type('cms_pass', $recordNew['firstname']); | |
209 | $this->type('cms_confirm_pass', $recordNew['firstname']); | |
210 | $this->click('_qf_Useradd_next-bottom'); | |
211 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
42daf119 CW |
212 | $this->webtestLogout(); |
213 | ||
050fb75a | 214 | $this->webtestLogin($recordNew['firstname'], $recordNew['firstname']); |
6a488035 | 215 | } |
d45e6108 | 216 | $this->openCiviPage('profile/edit', "reset=1&id=$id&gid=$gid", NULL); |
6a488035 | 217 | if (!$checkMultiRecord) { |
9c7c904f | 218 | $this->assertElementContainsText('crm-container', 'No records'); |
a90b085c | 219 | return array($gid, $profileTitle); |
6a488035 | 220 | } |
ee88fff2 PJ |
221 | $this->waitForElementPresent("//a/span[contains(text(), 'Add New Record')]"); |
222 | $this->click("//a/span[contains(text(), 'Add New Record')]"); | |
51858dd1 CW |
223 | $this->waitForElementPresent("_qf_Edit_next"); |
224 | $record1 = $this->_addRecords('Edit', TRUE); | |
f1690d4a | 225 | $this->waitForElementPresent("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[2]/td[1]"); |
226 | $alertText = $this->getAlert(); | |
227 | $this->assertEquals("Thank you. Your information has been saved.", $alertText); | |
228 | $this->waitForElementPresent("//a/span[contains(text(), 'Add New Record')]"); | |
229 | $this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/thead/tr/th[1]", preg_quote($params['textFieldLabel'])); | |
230 | $this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[2]/td[1]", preg_quote($record1['text'])); | |
ee88fff2 | 231 | $this->click("//a/span[contains(text(), 'Add New Record')]"); |
51858dd1 CW |
232 | $this->waitForElementPresent("_qf_Edit_next"); |
233 | $record2 = $this->_addRecords('Edit', TRUE); | |
f1690d4a | 234 | $this->waitForElementPresent("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[3]/td[1]"); |
235 | $alertText = $this->getAlert(); | |
236 | $this->assertEquals("Thank you. Your information has been saved.", $alertText); | |
237 | $this->waitForElementPresent("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[3]/td[1]"); | |
238 | $this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[3]/td[1]", preg_quote($record2['text'])); | |
b2552577 | 239 | |
6a488035 | 240 | // Check Max Record Limit |
ee88fff2 | 241 | $this->verifyElementNotPresent("//a/span[contains(text(), 'Add New Record')]"); |
b2552577 | 242 | |
6a488035 | 243 | //Check for edit functionality |
f1690d4a | 244 | $this->click("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr/td[3]/span/a[text()='Edit']"); |
51858dd1 | 245 | $this->waitForElementPresent("xpath=//div[@class='ui-dialog-content ui-widget-content modal-dialog crm-ajax-container']/form/div[2]//div[@id='crm-profile-block']"); |
f1690d4a | 246 | $this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/thead/tr/th[1]", preg_quote($params['textFieldLabel'])); |
92fcb95f | 247 | $this->type("//div[@id='crm-profile-block']/div/div[2]/input[@class='crm-form-text required']", $recordNew['text'] . 'edit'); |
51858dd1 | 248 | $this->click("css=.ui-dialog-buttonset button[data-identifier=_qf_Edit_next]"); |
92fcb95f | 249 | $this->waitForText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[1]/td[1]", $recordNew['text'] . 'edit'); |
f1690d4a | 250 | $editalertText = $this->getAlert(); |
251 | $this->assertEquals("Thank you. Your information has been saved.", $editalertText); | |
92fcb95f | 252 | $this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[1]/td[1]", preg_quote($recordNew['text'] . 'edit')); |
b2552577 | 253 | |
6a488035 | 254 | // Check the delete functionality |
f1690d4a | 255 | $this->click("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr/td[3]/span/a[text()='Delete']"); |
51858dd1 | 256 | $this->waitForText("css=.ui-dialog-content.crm-ajax-container", 'Are you sure you want to delete this record?'); |
f1690d4a | 257 | $this->click('_qf_Edit_upload_delete'); |
b2552577 | 258 | |
51858dd1 | 259 | $this->waitForElementPresent("//a/span[contains(text(), 'Add New Record')]"); |
f1690d4a | 260 | $delText = $this->getAlert(); |
261 | $this->assertEquals("Deleted Your record has been deleted.", $delText); | |
51858dd1 | 262 | |
f1690d4a | 263 | $this->click("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr/td[3]/span/a[text()='View']"); |
92fcb95f | 264 | $this->waitForText("css=.ui-dialog-title", 'View ' . $params['customGroupTitle'] . ' Record'); |
51858dd1 | 265 | $this->assertElementContainsText("css=.ui-dialog-content.crm-ajax-container", $params['textFieldLabel']); |
6a488035 | 266 | if ($checkSearchable) { |
9c7c904f | 267 | $this->verifyElementNotPresent("//div[@id='profile-dialog']/div/div/div/div/div[1]/div[2]/a"); |
a90b085c | 268 | return array($gid, $profileTitle); |
6a488035 | 269 | } |
b2552577 | 270 | |
6a488035 TO |
271 | // Check Search Functionality |
272 | if (!$userCheck) { | |
f1690d4a | 273 | $this->click("//div[@class='ui-dialog-content ui-widget-content modal-dialog crm-ajax-container']/div/div/div/div/div[2]/a"); |
6a488035 | 274 | $this->waitForElementPresent("//form[@id='Search']"); |
9c7c904f | 275 | $this->verifyText("//form[@id='Search']/div[2]/div[2]/div[2]/table/tbody/tr[2]/td[2]", preg_quote($recordNew['firstname'])); |
38bf8139 | 276 | $this->openCiviPage('profile/view', "reset=1&id=$id&gid=$gid", "//div[@id='row-first_name']/div[2]/a"); |
6a488035 TO |
277 | $this->click("//div[@id='row-first_name']/div[2]/a"); |
278 | $this->waitForElementPresent("//form[@id='Search']"); | |
279 | // Check that Email column is not present in selector results | |
9c7c904f PJ |
280 | $this->verifyElementNotPresent("//form[@id='Search']/div[2]/div[2]/div[2]/table/tbody/tr/th[7]/a[@label='Email (Primary)']"); |
281 | $this->verifyText("//form[@id='Search']/div[2]/div[2]/div[2]/table/tbody/tr/th[3]/a", preg_quote($params['textFieldLabel'])); | |
282 | $this->verifyText("//form[@id='Search']/div[2]/div[2]/div[2]/table/tbody/tr[2]/td[3]", preg_quote($record1['text'])); | |
283 | $this->verifyText("//form[@id='Search']/div[2]/div[2]/div[2]/table/tbody/tr[3]/td[3]", preg_quote($record2['text'])); | |
6a488035 | 284 | } |
a90b085c PJ |
285 | return array($gid, $profileTitle); |
286 | } | |
287 | ||
4cbe18b8 | 288 | /** |
100fef9d | 289 | * @param int $gid |
4cbe18b8 EM |
290 | * @param $profileTitle |
291 | */ | |
00be9182 | 292 | public function _deleteProfile($gid, $profileTitle) { |
050fb75a | 293 | $this->webtestLogin(); |
a90b085c PJ |
294 | $this->openCiviPage("admin/uf/group", "action=delete&id={$gid}", '_qf_Group_next-bottom'); |
295 | $this->click('_qf_Group_next-bottom'); | |
296 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
297 | $this->assertElementContainsText('crm-container', "Your CiviCRM Profile '{$profileTitle}' has been deleted."); | |
6a488035 TO |
298 | } |
299 | ||
4cbe18b8 EM |
300 | /** |
301 | * @param $checkSearchable | |
302 | * | |
303 | * @return mixed | |
304 | */ | |
00be9182 | 305 | public function _testCustomAdd($checkSearchable) { |
42daf119 | 306 | |
38bf8139 | 307 | $this->openCiviPage('admin/custom/group', 'action=add&reset=1'); |
6a488035 TO |
308 | |
309 | //fill custom group title | |
310 | $params['customGroupTitle'] = 'custom_group' . substr(sha1(rand()), 0, 3); | |
311 | $this->click("title"); | |
312 | $this->type("title", $params['customGroupTitle']); | |
313 | ||
314 | //custom group extends | |
315 | $this->click("extends[0]"); | |
316 | $this->select("extends[0]", "label=Contacts"); | |
317 | $this->click("//option[@value='Contact']"); | |
318 | $this->waitForElementPresent("//input[@id='is_multiple']"); | |
319 | $this->click("//input[@id='is_multiple']"); | |
320 | $this->type("max_multiple", 3); | |
51858dd1 | 321 | $this->clickLink("//form[@id='Group']/div[2]/div[3]/span[1]/input"); |
6a488035 TO |
322 | |
323 | //Is custom group created? | |
38bf8139 | 324 | $this->assertElementContainsText('crm-container', $params['customGroupTitle']); |
51858dd1 CW |
325 | |
326 | $gid = $this->urlArg('gid'); | |
327 | $this->openCiviPage('admin/custom/group/field/add', 'reset=1&action=add&gid=' . $gid); | |
328 | ||
6a488035 TO |
329 | //add custom field - alphanumeric text |
330 | $params['textFieldLabel'] = 'test_text_field' . substr(sha1(rand()), 0, 3); | |
331 | $this->click("header"); | |
332 | $this->type("label", $params['textFieldLabel']); | |
333 | //Is searchable? | |
334 | if (!$checkSearchable) { | |
335 | $this->click("is_searchable"); | |
336 | } | |
337 | $this->click("_qf_Field_next_new-bottom"); | |
338 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
339 | $this->click("data_type[0]"); | |
340 | $this->select("data_type[0]", "value=0"); | |
341 | $this->click("//option[@value='0']"); | |
342 | $this->click("data_type[1]"); | |
343 | $this->select("data_type[1]", "label=Select"); | |
344 | $this->click("//option[@value='Select']"); | |
345 | ||
346 | $params['selectFieldLabel'] = 'test_select' . substr(sha1(rand()), 0, 5); | |
347 | $this->type("label", $params['selectFieldLabel']); | |
348 | $selectOptionLabel1 = 'option1' . substr(sha1(rand()), 0, 3); | |
349 | $this->type("option_label_1", $selectOptionLabel1); | |
350 | $this->type("option_value_1", "1"); | |
351 | $selectOptionLabel2 = 'option2' . substr(sha1(rand()), 0, 3); | |
352 | $this->type("option_label_2", $selectOptionLabel2); | |
353 | $this->type("option_value_2", "2"); | |
354 | $this->click("link=another choice"); | |
355 | ||
356 | //enter pre help message | |
357 | $this->type("help_pre", "this is field pre help"); | |
358 | ||
359 | //enter post help message | |
360 | $this->type("help_post", "this field post help"); | |
361 | ||
362 | //Is searchable? | |
363 | $this->click("is_searchable"); | |
364 | ||
365 | //clicking save | |
51858dd1 | 366 | $this->click("_qf_Field_done-bottom"); |
6a488035 TO |
367 | |
368 | //Is custom field created? | |
f1690d4a | 369 | $this->waitForText('crm-notification-container', $params['selectFieldLabel']); |
6a488035 TO |
370 | return $params; |
371 | } | |
372 | ||
4cbe18b8 EM |
373 | /** |
374 | * @param string $context | |
375 | * @param string $parentElement | |
376 | * | |
377 | * @return mixed | |
378 | */ | |
00be9182 | 379 | public function _addRecords($context = 'Edit', $dialog = FALSE) { |
6a488035 | 380 | $params['text'] = 'text' . substr(sha1(rand()), 0, 3); |
f1690d4a | 381 | $this->waitForElementPresent("//div[@id='crm-profile-block']/div/div[2]/input[@class='crm-form-text required']"); |
382 | $this->type("//div[@id='crm-profile-block']/div/div[2]/input[@class='crm-form-text required']", $params['text']); | |
6a488035 TO |
383 | if ($context == 'Create') { |
384 | $params['firstname'] = 'John' . substr(sha1(rand()), 0, 3); | |
385 | $this->type('first_name', $params['firstname']); | |
386 | $params['lastname'] = 'Anderson' . substr(sha1(rand()), 0, 3); | |
387 | $this->type('last_name', $params['lastname']); | |
92fcb95f | 388 | $params['email'] = $params['firstname'] . $params['lastname'] . '@exa.com'; |
6a488035 | 389 | $this->type('email-Primary', $params['email']); |
f1690d4a | 390 | $this->waitForElementPresent("//div[@id='crm-profile-block']//div/div[2]/select"); |
6c6e6187 | 391 | $this->select("//div[@id='crm-profile-block']//div/div[2]/select", 'value=1'); |
f1690d4a | 392 | } |
393 | else { | |
394 | $this->waitForElementPresent("//div[@id='crm-profile-block']//div/div[2]/select"); | |
6c6e6187 | 395 | $this->select("//div[@id='crm-profile-block']//div/div[2]/select", 'value=1'); |
51858dd1 CW |
396 | |
397 | } | |
398 | if ($dialog) { | |
399 | $this->click("css=.ui-dialog-buttonset button[data-identifier=_qf_Edit_next]"); | |
400 | } | |
401 | else { | |
402 | $this->click("_qf_Edit_next"); | |
6a488035 | 403 | } |
6a488035 TO |
404 | return $params; |
405 | } | |
232624b1 | 406 | } |