Test_SNF_SOC_12_Demo_LeaveSpace
open /portal/public/default/
windowMaximize
echo -- Log in
waitForElementPresent link=exact:Acme: Social Intranet
clickAndWait link=exact:Acme: Social Intranet
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
echo --Login : Root
clickAndWait link=Sign in
echo --My Spaces
waitForElementPresent link=My Spaces
clickAndWait link=My Spaces
echo -- Add a new Space
waitForElementPresent link=Add New Space
click link=Add New Space
waitForElementPresent name
type name Space12
type description This is description for Space_12
click link=Create
echo -- Verify space created :   SOC-1251
waitForElementPresent link=Space12
click link=Space12
echo -- Invite a user to join the Space
waitForElementPresent link=Space Settings
click link=Space Settings
waitForElementPresent //div[text()='Members']
click //div[text()='Members']
waitForElementPresent user
type user mary
waitForElementPresent //div[@title='Invite']
click //div[@title='Invite']
waitForTextPresent mary
verifyTextPresent mary
waitForElementPresent link=Logout
clickAndWait link=Logout
echo -- Accept the Invite
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username mary
type password gtn
echo --Login : mary
clickAndWait link=Sign in
waitForElementPresent link=My Spaces
click link=My Spaces
waitForElementPresent link=Invitations
click link=Invitations
waitForElementPresent //span[text()='Space12']/ancestor:: div/a[@title='Accept']
click //span[text()='Space12']/ancestor:: div/a[@title='Accept']
waitForElementNotPresent //span[text()='Space12']/ancestor:: div/a[@title='Accept']
verifyElementNotPresent //span[text()='Space12']/ancestor:: div/a[@title='Accept']
echo -- Verify Accept the Invite successfully
waitForElementPresent link=My Spaces
click link=My Spaces
echo -- Leave Space
waitForElementPresent //a[text()='Space12']/ancestor:: div/a[@title='Leave Space']
click //a[text()='Space12']/ancestor:: div/a[@title='Leave Space']
waitForElementNotPresent //a[text()='Space12']/ancestor:: div/a[@title='Leave Space']
verifyElementNotPresent //a[text()='Space12']/ancestor:: div/a[@title='Leave Space']
waitForElementPresent link=Logout
clickAndWait link=Logout
echo -- Delete Space created
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
waitForElementPresent link=My Spaces
click link=My Spaces
waitForElementPresent //a[text()='Space12']/ancestor:: div/a[@title='Delete Space']
click //a[text()='Space12']/ancestor:: div/a[@title='Delete Space']
waitForConfirmation Are you sure to delete this space? This can not be undone. All page navigations and this group will be deleted, too.
waitForElementNotPresent //a[text()='Space12']/ancestor:: div/a[@title='Delete Space']
verifyElementNotPresent //a[text()='Space12']/ancestor:: div/a[@title='Delete Space']
echo --Logout
waitForElementPresent link=Logout
clickAndWait link=Logout