Test_SNF_CS48_TagContact
open /portal/intranet/
windowMaximize
echo -Tag Contacts-
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username john
type password gtn
clickAndWait id=UIPortalLoginFormAction
echo -- Add an Contact
waitForElementPresent link=Contacts
click link=Contacts
waitForElementPresent link=Contact
click link=Contact
waitForElementPresent firstName
type firstName Test_48
type lastName eXo_Contact
type nickName Contact_48
type jobTitle eXo_Tester_48
type multiEmail0 Test_48@gmail.com
click link=Save
echo -- Verify contacts created
waitForElementPresent xpath=//div[@class='PersonalAddress']//div[@title='My Contacts']
click xpath=//div[@class='PersonalAddress']//div[@title='My Contacts']
waitForElementPresent link=Test_48 eXo_Contact
verifyElementPresent link=Test_48 eXo_Contact
waitForElementPresent link=Test_48@gmail.com
verifyElementPresent link=Test_48@gmail.com
echo -- Set tag for Contact
click //tr[2]/td[1]/input
click //div[2]/a[2]/div
waitForElementPresent tagName
type tagName Tag_Contact_48
click //form[@id='UITagForm']/div[2]/div/div/table/tbody/tr/td/div[1]/div/div/div/a
echo -- Verify Tag added
waitForElementPresent link=Tag_Contact_48
click link=Tag_Contact_48
waitForElementPresent link=Test_48 eXo_Contact
verifyElementPresent link=Test_48 eXo_Contact
echo -- Delete Contact
click //div[2]/a[4]/div
assertConfirmation Are you sure you want to delete this contact ?
waitForElementNotPresent link=Test_48 eXo_Contact
verifyElementNotPresent link=Test_48 eXo_Contact
echo -- Delete tag
mouseOver link=Tag_Contact_48
contextMenu link=Tag_Contact_48
waitForElementPresent link=Delete
click link=Delete
waitForElementNotPresent link=Tag_Contact_48
verifyElementNotPresent link=Tag_Contact_48
assertConfirmation Are you sure you want to delete this tag ?
echo -- Logout
waitForElementPresent link=Logout
clickAndWait link=Logout