Test_SNF_SOC_09_Demo_RemoveUserfromSpace
open /socialdemo/public/classic/
windowMaximize
echo --  Remove User
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
waitForElementPresent link=Spaces
clickAndWait link=Spaces
echo -- Add a new Space
waitForElementPresent link=Add New Space
click link=Add New Space
waitForElementPresent displayName
type displayName Space09
type description This is description for Space_09
waitForElementPresent link=Create
clickAt link=Create 2,2
pause 12000
echo -- Verify space created
waitForElementPresent link=Space09
click link=Space09
waitForTextPresent Space09 was created
verifyTextPresent Space09 was created
echo -- Invite a user to join the Space
waitForElementPresent //a[contains(@href,'space09/settings')]
click //a[contains(@href,'space09/settings')]
waitForElementPresent //div[text()='Members']
click //div[text()='Members']
waitForElementPresent user
type user mary
waitForElementPresent //a[@title='Invite']
click //a[@title='Invite']
waitForTextPresent mary
verifyTextPresent mary
waitForElementPresent link=Sign out
clickAndWait link=Sign out
echo -- Accept the Invite
click link=Sign in
waitForElementPresent username
type username mary
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
waitForElementPresent link=Spaces
clickAndWait link=Spaces
waitForElementPresent link=Received Invitations
clickAndWait link=Received Invitations
echo -- Verify your Space Invitation is displayed
waitForTextPresent This is description for Space_09
verifyTextPresent This is description for Space_09
waitForElementPresent //div/a[text()='Space09']/following::ul//a[@title='Accept']
click //div/a[text()='Space09']/following::ul//a[@title='Accept']
echo --Check My space list of user after accept invitation--
waitForElementPresent link=My Spaces
click link=My Spaces
waitForTextPresent This is description for Space_09
verifyTextPresent This is description for Space_09
waitForElementPresent link=Sign out
clickAndWait link=Sign out
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
clickAndWait link=Space09
echo -- - Verify accepted user is displayed in Member lisr
waitForElementPresent //a[contains(@href,'space09/members')]
click //a[contains(@href,'space09/members')]
waitForElementPresent link=Mary Kelly
verifyElementPresent link=Mary Kelly
echo -- Select Settings tabs
waitForElementPresent //a[contains(@href,'space09/settings')]
click //a[contains(@href,'space09/settings')]
echo -- Members tabs in Setting
waitForElementPresent //div[text()='Members']
click //div[text()='Members']
echo -- Delete Mary
waitForElementPresent //td[text()='mary']/following::td/a[@title='Remove']
click //td[text()='mary']/following::td/a[@title='Remove']
waitForTextNotPresent mary
verifyTextNotPresent mary
echo -- Sign out
waitForElementPresent link=Sign out
clickAndWait link=Sign out