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_Contact_AddTest | |
31 | */ | |
6a488035 TO |
32 | class WebTest_Contact_AddTest extends CiviSeleniumTestCase { |
33 | ||
34 | protected function setUp() { | |
35 | parent::setUp(); | |
36 | } | |
37 | ||
00be9182 | 38 | public function testIndividualAdd() { |
6a488035 TO |
39 | $this->webtestLogin(); |
40 | ||
fdec0f57 | 41 | $groupName = $this->WebtestAddGroup(); |
6a488035 TO |
42 | |
43 | // go to display preferences to enable Open ID field | |
69369531 | 44 | $this->openCiviPage('admin/setting/preferences/display', "reset=1", "_qf_Display_next-bottom"); |
6a488035 TO |
45 | $this->check("xpath=//ul[@id='contactEditBlocks']//li/span[2]/label[text()='Open ID']/../input"); |
46 | $this->click("_qf_Display_next-bottom"); | |
47 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
48 | $this->openCiviPage('contact/add', 'reset=1&ct=Individual'); | |
49 | ||
50 | //contact details section | |
51 | //select prefix | |
52 | $this->click("prefix_id"); | |
53 | $this->select("prefix_id", "value=" . $this->webtestGetFirstValueForOptionGroup('individual_prefix')); | |
54 | ||
55 | //fill in first name | |
56 | $this->type("first_name", substr(sha1(rand()), 0, 7) . "John"); | |
57 | ||
58 | //fill in middle name | |
59 | $this->type("middle_name", "Bruce"); | |
60 | ||
61 | //fill in last name | |
62 | $this->type("last_name", substr(sha1(rand()), 0, 7) . "Smith"); | |
63 | ||
64 | //select suffix | |
65 | $this->select("suffix_id", "value=3"); | |
66 | ||
67 | //fill in nick name | |
68 | $this->type("nick_name", "jsmith"); | |
69 | ||
70 | //fill in email | |
71 | $this->type("email_1_email", substr(sha1(rand()), 0, 7) . "john@gmail.com"); | |
72 | ||
73 | //fill in phone | |
74 | $this->type("phone_1_phone", "2222-4444"); | |
75 | ||
76 | //fill in IM | |
77 | $this->type("im_1_name", "testYahoo"); | |
78 | ||
79 | //fill in openID | |
80 | $this->type("openid_1_openid", "http://" . substr(sha1(rand()), 0, 7) . "openid.com"); | |
81 | ||
82 | //fill in website | |
83 | $this->type("website_1_url", "http://www.john.com"); | |
84 | ||
85 | //fill in source | |
86 | $this->type("contact_source", "johnSource"); | |
87 | ||
88 | //fill in external identifier | |
89 | $indExternalId = substr(sha1(rand()), 0, 4); | |
90 | $this->type("external_identifier", $indExternalId); | |
91 | ||
92 | //check for matching contact | |
93 | $this->click("_qf_Contact_refresh_dedupe"); | |
94 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
95 | ||
96 | //address section | |
97 | $this->click("addressBlock"); | |
98 | $this->waitForElementPresent("address_1_street_address"); | |
99 | //fill in address 1 | |
100 | $this->type("address_1_street_address", "902C El Camino Way SW"); | |
101 | $this->type("address_1_city", "Dumfries"); | |
102 | $this->type("address_1_postal_code", "1234"); | |
103 | ||
104 | $this->click("address_1_country_id"); | |
105 | $this->select("address_1_country_id", "value=" . $this->webtestGetValidCountryID()); | |
106 | ||
7df6dc24 | 107 | if ($this->assertElementContainsText('address_table_1', "Latitude")) { |
6a488035 TO |
108 | $this->type("address_1_geo_code_1", "1234"); |
109 | $this->type("address_1_geo_code_2", "5678"); | |
110 | } | |
111 | ||
112 | //fill in address 2 | |
113 | $this->click("//div[@id='addMoreAddress1']/a/span"); | |
114 | $this->waitForElementPresent("address_2_street_address"); | |
115 | $this->type("address_2_street_address", "2782Y Dowlen Path W"); | |
116 | $this->type("address_2_city", "Birmingham"); | |
117 | $this->type("address_2_postal_code", "3456"); | |
118 | ||
119 | $this->click("address_2_country_id"); | |
120 | $this->select("address_2_country_id", "value=" . $this->webtestGetValidCountryID()); | |
121 | ||
7df6dc24 | 122 | if ($this->assertElementContainsText('address_table_2', "Latitude")) { |
6a488035 TO |
123 | $this->type("address_2_geo_code_1", "1234"); |
124 | $this->type("address_2_geo_code_2", "5678"); | |
125 | } | |
126 | ||
127 | //Communication Preferences section | |
128 | $this->click("commPrefs"); | |
129 | ||
130 | //select greeting/addressee options | |
131 | $this->waitForElementPresent("email_greeting_id"); | |
132 | $this->select("email_greeting_id", "value=2"); | |
133 | $this->select("postal_greeting_id", "value=3"); | |
134 | ||
135 | //Select preferred method for Privacy | |
136 | $this->click("privacy[do_not_trade]"); | |
137 | $this->click("privacy[do_not_sms]"); | |
138 | ||
139 | //Select preferred method(s) of communication | |
140 | $this->click("preferred_communication_method[1]"); | |
141 | $this->click("preferred_communication_method[2]"); | |
142 | ||
143 | //select preferred language | |
144 | $this->waitForElementPresent("preferred_language"); | |
145 | $this->select("preferred_language", "value=en_US"); | |
146 | ||
147 | //Notes section | |
148 | $this->click("notesBlock"); | |
149 | $this->waitForElementPresent("subject"); | |
150 | $this->type("subject", "test note"); | |
151 | $this->type("note", "this is a test note contact webtest"); | |
79d6583c | 152 | $this->assertElementContainsText('notesBlock', "Subject\n Notes"); |
6a488035 TO |
153 | |
154 | //Demographics section | |
155 | $this->click("//div[@class='crm-accordion-header' and contains(.,'Demographics')]"); | |
156 | $this->waitForElementPresent("birth_date"); | |
157 | ||
158 | $this->webtestFillDate('birth_date', "-1 year"); | |
159 | ||
160 | //Tags and Groups section | |
161 | $this->click("tagGroup"); | |
162 | ||
fdec0f57 | 163 | // select group |
0e32ba2d | 164 | $this->select("group", "label=$groupName"); |
6a488035 TO |
165 | $this->click("tag[{$this->webtestGetValidEntityID('Tag')}]"); |
166 | ||
167 | // Clicking save. | |
168 | $this->click("_qf_Contact_upload_view"); | |
169 | ||
170 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
6c5f7368 | 171 | $this->waitForText('crm-notification-container', "Contact Saved"); |
6a488035 TO |
172 | } |
173 | ||
00be9182 | 174 | public function testHouseholdAdd() { |
6a488035 TO |
175 | $this->webtestLogin(); |
176 | ||
fdec0f57 | 177 | $groupName = $this->WebtestAddGroup(); |
178 | ||
721cf6e0 | 179 | // go to display preferences to enable Open ID field |
6a488035 TO |
180 | $this->openCiviPage('admin/setting/preferences/display', "reset=1", "_qf_Display_next-bottom"); |
181 | $this->check("xpath=//ul[@id='contactEditBlocks']//li/span[2]/label[text()='Open ID']/../input"); | |
182 | $this->click("_qf_Display_next-bottom"); | |
183 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
184 | ||
6a488035 TO |
185 | $this->openCiviPage('contact/add', "reset=1&ct=Household"); |
186 | ||
187 | //contact details section | |
188 | //fill in Household name | |
189 | $this->click("household_name"); | |
190 | $name = substr(sha1(rand()), 0, 7) . "Fraddie Grant's home "; | |
191 | $this->type("household_name", $name); | |
192 | ||
193 | //fill in nick name | |
194 | $this->type("nick_name", substr(sha1(rand()), 0, 7) . "Grant's home"); | |
195 | ||
196 | //fill in email | |
197 | $email = substr(sha1(rand()), 0, 7) . "fraddiegrantshome@web.com "; | |
198 | $this->type("email_1_email", $email); | |
199 | $this->click("Email_1_IsBulkmail"); | |
200 | ||
201 | //fill in phone | |
202 | $this->type("phone_1_phone", "444-4444"); | |
203 | $this->select("phone_1_phone_type_id", "value=" . $this->webtestGetFirstValueForOptionGroup('phone_type')); | |
204 | ||
6a488035 | 205 | //fill in IM |
b86fcc87 | 206 | foreach (array('Yahoo', 'MSN', 'AIM', 'GTalk', 'Jabber', 'Skype') as $option) { |
207 | $this->assertSelectHasOption('im_1_provider_id', $option); | |
208 | } | |
6a488035 TO |
209 | $this->type("im_1_name", "testSkype"); |
210 | $this->select("im_1_location_type_id", "value=3"); | |
211 | $this->select("im_1_provider_id", "value=6"); | |
212 | ||
213 | //fill in openID | |
214 | $this->type("openid_1_openid", "http://" . substr(sha1(rand()), 0, 7) . "shomeopenid.com"); | |
215 | ||
216 | //fill in website url | |
217 | $this->type("website_1_url", "http://www.fraddiegrantshome.com"); | |
218 | ||
219 | //fill in contact source | |
220 | $this->type("contact_source", "Grant's home source"); | |
221 | ||
222 | //fill in external identifier | |
223 | $houExternalId = substr(sha1(rand()), 0, 4); | |
224 | $this->type("external_identifier", $houExternalId); | |
225 | ||
226 | //check for duplicate contact | |
227 | $this->click("_qf_Contact_refresh_dedupe"); | |
228 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
229 | ||
230 | //address section | |
231 | $this->click("addressBlock"); | |
232 | $this->waitForElementPresent("address_1_street_address"); | |
233 | $this->type("address_1_street_address", "938U Bay Rd E"); | |
234 | $this->type("address_1_city", "Birmingham"); | |
235 | $this->type("address_1_postal_code", "35278"); | |
236 | ||
237 | $this->click("address_1_country_id"); | |
238 | $this->select("address_1_country_id", "value=" . $this->webtestGetValidCountryID()); | |
239 | ||
7df6dc24 | 240 | if ($this->assertElementContainsText('address_table_1', "Latitude")) { |
6a488035 TO |
241 | $this->type("address_1_geo_code_1", "1234"); |
242 | $this->type("address_1_geo_code_2", "5678"); | |
243 | } | |
244 | ||
245 | //Communication Preferences section | |
246 | $this->click("commPrefs"); | |
247 | ||
248 | //select greeting/addressee options | |
249 | $this->waitForElementPresent("addressee_id"); | |
250 | $this->select("addressee_id", "value=4"); | |
251 | $this->type("addressee_custom", "Grant's home"); | |
252 | ||
253 | //Select preferred method(s) of communication | |
254 | $this->click("preferred_communication_method[1]"); | |
255 | $this->click("preferred_communication_method[2]"); | |
256 | $this->click("preferred_communication_method[5]"); | |
257 | ||
258 | //Select preferred method for Privacy | |
259 | $this->click("privacy[do_not_sms]"); | |
260 | ||
261 | //select preferred language | |
262 | $this->waitForElementPresent("preferred_language"); | |
263 | $this->select("preferred_language", "value=fr_FR"); | |
264 | ||
6a488035 | 265 | //Notes section |
d9a0c6be | 266 | $this->clickAt("//*[@id='Contact']/div[2]/div[6]/div[1]"); |
6a488035 TO |
267 | $this->waitForElementPresent("subject"); |
268 | $this->type("subject", "Grant's note"); | |
269 | $this->type("note", "This is a household contact webtest note."); | |
270 | ||
fdec0f57 | 271 | // select group |
c1d1bf14 WA |
272 | $this->clickAt("xpath=//div[text()='Tags and Groups']"); |
273 | $this->select("group", "label=$groupName"); | |
fdec0f57 | 274 | |
275 | //tags section | |
6a488035 TO |
276 | $this->click("tag[{$this->webtestGetValidEntityID('Tag')}]"); |
277 | ||
278 | // Clicking save. | |
279 | $this->click("_qf_Contact_upload_view"); | |
280 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
281 | ||
6c5f7368 | 282 | $this->waitForText('crm-notification-container', "Contact Saved"); |
6a488035 TO |
283 | } |
284 | ||
00be9182 | 285 | public function testOrganizationAdd() { |
6a488035 TO |
286 | $this->webtestLogin(); |
287 | ||
fdec0f57 | 288 | $groupName = $this->WebtestAddGroup(); |
289 | ||
6a488035 TO |
290 | // go to display preferences to enable Open ID field |
291 | $this->openCiviPage('admin/setting/preferences/display', "reset=1", "_qf_Display_next-bottom"); | |
292 | $this->check("xpath=//ul[@id='contactEditBlocks']//li/span[2]/label[text()='Open ID']/../input"); | |
293 | $this->click("_qf_Display_next-bottom"); | |
294 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
42daf119 | 295 | |
79d6583c | 296 | $this->openCiviPage('contact/add', 'reset=1&ct=Organization'); |
6a488035 TO |
297 | |
298 | //contact details section | |
299 | //fill in Organization name | |
300 | $this->click("organization_name"); | |
301 | $this->type("organization_name", substr(sha1(rand()), 0, 7) . "syntel tech"); | |
302 | ||
303 | //fill in legal name | |
304 | $this->type("legal_name", "syntel tech Ltd"); | |
305 | ||
306 | //fill in nick name | |
307 | $this->type("nick_name", "syntel"); | |
308 | ||
309 | //fill in email | |
310 | $this->type("email_1_email", substr(sha1(rand()), 0, 7) . "info@syntel.com"); | |
311 | ||
312 | //fill in phone | |
313 | $this->type("phone_1_phone", "222-7777"); | |
314 | $this->select("phone_1_phone_type_id", "value=2"); | |
315 | ||
316 | //fill in IM | |
317 | $this->type("im_1_name", "testGtalk"); | |
318 | $this->select("im_1_location_type_id", "value=4"); | |
319 | $this->select("im_1_provider_id", "value=4"); | |
320 | ||
321 | //fill in openID | |
322 | $this->select("openid_1_location_type_id", "value=5"); | |
323 | $this->type("openid_1_openid", "http://" . substr(sha1(rand()), 0, 7) . "Openid.com"); | |
324 | ||
325 | //fill in website url | |
326 | $this->type("website_1_url", "http://syntelglobal.com"); | |
327 | ||
328 | //fill in contact source | |
329 | $this->type("contact_source", "syntel's source"); | |
330 | ||
331 | //fill in external identifier | |
332 | $orgExternalId = substr(sha1(rand()), 0, 4); | |
333 | $this->type("external_identifier", $orgExternalId); | |
334 | ||
335 | //check for duplicate contact | |
336 | $this->click("_qf_Contact_refresh_dedupe"); | |
337 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
338 | ||
339 | //address section | |
340 | $this->click("addressBlock"); | |
341 | $this->waitForElementPresent("address_1_street_address"); | |
342 | $this->type("address_1_street_address", "928A Lincoln Way W"); | |
343 | $this->type("address_1_city", "Madison"); | |
344 | $this->type("address_1_postal_code", "68748"); | |
345 | ||
346 | $this->click("address_1_country_id"); | |
347 | $this->select("address_1_country_id", "value=" . $this->webtestGetValidCountryID()); | |
348 | ||
7df6dc24 | 349 | if ($this->assertElementContainsText('address_table_1', "Latitude")) { |
6a488035 TO |
350 | $this->type("address_1_geo_code_1", "1234"); |
351 | $this->type("address_1_geo_code_2", "5678"); | |
352 | } | |
353 | ||
354 | //Communication Preferences section | |
355 | $this->click("commPrefs"); | |
356 | ||
357 | //Select preferred method(s) of communication | |
358 | $this->click("preferred_communication_method[2]"); | |
359 | $this->click("preferred_communication_method[5]"); | |
360 | ||
361 | //Select preferred method for Privacy | |
362 | $this->click("privacy[do_not_sms]"); | |
363 | $this->click("privacy[do_not_mail]"); | |
364 | //select preferred language | |
365 | $this->waitForElementPresent("preferred_language"); | |
366 | $this->select("preferred_language", "value=de_DE"); | |
367 | ||
368 | //Notes section | |
369 | $this->click("notesBlock"); | |
370 | $this->waitForElementPresent("subject"); | |
371 | $this->type("subject", "syntel global note"); | |
372 | $this->type("note", "This is a note for syntel global's contact webtest."); | |
373 | ||
374 | //Tags and Groups section | |
375 | $this->click("tagGroup"); | |
fdec0f57 | 376 | |
377 | // select group | |
e6e201a5 | 378 | $this->select("group", "label=$groupName"); |
fdec0f57 | 379 | |
6a488035 TO |
380 | $this->click("tag[{$this->webtestGetValidEntityID('Tag')}]"); |
381 | ||
382 | // Clicking save. | |
383 | $this->click("_qf_Contact_upload_view"); | |
384 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
385 | ||
6c5f7368 | 386 | $this->waitForText('crm-notification-container', "Contact Saved"); |
6a488035 TO |
387 | } |
388 | ||
00be9182 | 389 | public function testIndividualAddWithSharedAddress() { |
6a488035 TO |
390 | $this->webtestLogin(); |
391 | ||
69369531 | 392 | $this->openCiviPage('contact/add', "reset=1&ct=Individual"); |
6a488035 TO |
393 | |
394 | //contact details section | |
395 | //select prefix | |
396 | $this->click("prefix_id"); | |
397 | $this->select("prefix_id", "value=" . $this->webtestGetFirstValueForOptionGroup('individual_prefix')); | |
398 | ||
399 | //fill in first name | |
400 | $this->type("first_name", substr(sha1(rand()), 0, 7) . "John"); | |
401 | ||
402 | //fill in middle name | |
403 | $this->type("middle_name", "Bruce"); | |
404 | ||
405 | $lastName = substr(sha1(rand()), 0, 7) . "Smith"; | |
406 | //fill in last name | |
407 | $this->type("last_name", $lastName); | |
408 | ||
409 | //create new current employer | |
410 | $currentEmployer = substr(sha1(rand()), 0, 7) . "Web Access"; | |
411 | ||
6a488035 TO |
412 | //fill in email |
413 | $this->type("email_1_email", substr(sha1(rand()), 0, 7) . "john@gmail.com"); | |
414 | ||
415 | //fill in phone | |
416 | $this->type("phone_1_phone", "2222-4444"); | |
417 | ||
418 | //fill in source | |
419 | $this->type("contact_source", "johnSource"); | |
420 | ||
421 | //address section | |
422 | $this->click("addressBlock"); | |
423 | $this->waitForElementPresent("address_1_street_address"); | |
424 | ||
425 | $this->select('address_1_location_type_id', 'value=2'); | |
426 | ||
427 | $this->click('address[1][use_shared_address]'); | |
428 | ||
429 | // create new organization with dialog | |
6acc185a | 430 | $this->clickAt("xpath=//div[@id='s2id_address_1_master_contact_id']/a"); |
431 | $this->click("xpath=//li[@class='select2-no-results']//a[contains(text(),' New Organization')]"); | |
6a488035 TO |
432 | |
433 | // create new contact using dialog | |
6acc185a | 434 | $this->waitForElementPresent("css=div#crm-profile-block"); |
6a488035 TO |
435 | $this->waitForElementPresent("_qf_Edit_next"); |
436 | ||
437 | $this->type('organization_name', $currentEmployer); | |
438 | $this->type('street_address-1', '902C El Camino Way SW'); | |
439 | $this->type("email-Primary", "john@gmail.com" . substr(sha1(rand()), 0, 7)); | |
440 | $this->type('city-1', 'Dumfries'); | |
441 | $this->type('postal_code-1', '1234'); | |
6acc185a | 442 | $this->select('state_province-1', 'value=1001'); |
6a488035 TO |
443 | |
444 | $this->click("_qf_Edit_next"); | |
445 | ||
446 | // Is new contact created? | |
15f40a30 | 447 | $this->waitForText("css=div.crm-status-box-msg", "$currentEmployer Created"); |
6acc185a | 448 | $this->select2('employer_id', $currentEmployer); |
6a488035 TO |
449 | |
450 | //make sure shared address is selected | |
451 | $this->waitForElementPresent('selected_shared_address-1'); | |
452 | ||
453 | //fill in address 2 | |
454 | $this->click("//div[@id='addMoreAddress1']/a/span"); | |
455 | $this->waitForElementPresent("address_2_street_address"); | |
456 | ||
457 | $this->select('address_2_location_type_id', 'value=1'); | |
458 | ||
459 | $this->click('address[2][use_shared_address]'); | |
460 | ||
461 | // create new household with dialog | |
6acc185a | 462 | $this->clickAt("xpath=//div[@id='s2id_address_2_master_contact_id']/a"); |
463 | $this->click("xpath=//li[@class='select2-no-results']//a[contains(text(),' New Household')]"); | |
6a488035 TO |
464 | |
465 | // create new contact using dialog | |
6acc185a | 466 | $this->waitForElementPresent("css=div#crm-profile-block"); |
6a488035 TO |
467 | $this->waitForElementPresent("_qf_Edit_next"); |
468 | ||
469 | $sharedHousehold = substr(sha1(rand()), 0, 7) . 'Smith Household'; | |
470 | $this->type('household_name', $sharedHousehold); | |
471 | $this->type('street_address-1', '2782Y Dowlen Path W'); | |
472 | $this->type("email-Primary", substr(sha1(rand()), 0, 7) . "john@gmail.com"); | |
473 | $this->type('city-1', 'Birmingham'); | |
474 | $this->type('postal_code-1', '3456'); | |
6acc185a | 475 | $this->select('state_province-1', 'value=1001'); |
6a488035 TO |
476 | |
477 | $this->click("_qf_Edit_next"); | |
478 | ||
479 | // Is new contact created? | |
da526d60 | 480 | $this->waitForText("css=div.crm-status-box-msg", "$sharedHousehold Created"); |
6a488035 TO |
481 | |
482 | //make sure shared address is selected | |
483 | $this->waitForElementPresent('selected_shared_address-2'); | |
484 | ||
485 | // Clicking save. | |
486 | $this->click("_qf_Contact_upload_view"); | |
487 | $this->waitForPageToLoad($this->getTimeoutMsec()); | |
488 | $name = $this->getText("xpath=//div[@class='crm-summary-display_name']"); | |
721cf6e0 | 489 | $this->waitForText('crm-notification-container', "$name has been created."); |
6a488035 TO |
490 | |
491 | //make sure current employer is set | |
492 | $this->verifyText("xpath=id('contactinfo-block')/div/div/div[2]/div", 'Employer'); | |
493 | $this->verifyText("xpath=id('contactinfo-block')/div/div/div[2]/div[2]/a[text()]", $currentEmployer); | |
494 | ||
495 | //make sure both shared address are set. | |
79d6583c RN |
496 | $this->assertElementContainsText('address-block-1', "Address belongs to $currentEmployer"); |
497 | $this->assertElementContainsText('address-block-2', "Address belongs to $sharedHousehold"); | |
6a488035 TO |
498 | |
499 | // make sure relationships are created | |
500 | $this->click("xpath=id('tab_rel')/a"); | |
79d6583c | 501 | $this->waitForElementPresent('permission-legend'); |
da526d60 DG |
502 | $this->assertElementContainsText('DataTables_Table_0', 'Employee of'); |
503 | $this->assertElementContainsText('DataTables_Table_0', 'Household Member of'); | |
6a488035 TO |
504 | } |
505 | } |