Test_SNF_CS46_ShareContact
open /portal
windowMaximize
echo -Share Address Book-
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username john
type password gtn
clickAndWait id=UIPortalLoginFormAction
echo -- Share a contact
waitForElementPresent link=Contacts
click link=Contacts
waitForElementPresent //div[@id='defaultjohn']/div
click //div[@id='defaultjohn']/div
waitForElementPresent //input[@value='4']
click //input[@value='4']
waitForElementPresent //a[7]/div
click //a[7]/div
waitForElementPresent user
type user root
click canEdit
click link=Save
type user demo
click link=Save
click link=Close
waitForElementPresent //div[@class='State SharedContact']
clickAt link=Logout
echo -- Login by root to check shared contact
open /portal
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=Contacts
clickAt link=Contacts
waitForElementPresent link=Shared
clickAt link=Shared
waitForElementPresent link=John Anthony
clickAt link=Logout
echo -- Login by demo to check shared address book
open /portal
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username demo
type password gtn
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=Contacts
clickAt link=Contacts
waitForElementPresent link=Shared
clickAt link=Shared
waitForElementPresent link=John Anthony
clickAt link=Logout
echo -- Login by john to remove share contact
open /portal
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username john
type password gtn
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=Contacts
clickAt link=Contacts
waitForElementPresent //div[@id='defaultjohn']/div
clickAt //div[@id='defaultjohn']/div
clickAt //input[@value='4']
clickAt //a[7]/div
waitForElementPresent //img[@alt='Delete']
clickAt //img[@alt='Delete']
assertConfirmation Are you sure you want to remove this permission ?
clickAt //img[@alt='Delete']
assertConfirmation Are you sure you want to remove this permission ?
clickAndWait link=Logout
close