Test_SNF_SOC_09_Demo_RemoveUserfromSpace
open /portal/public/intranet/
windowMaximize
echo --  Remove User
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username john
type password gtn
echo --Log in : John
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=My Spaces
clickAndWait link=My 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
click link=Create
pause 30000
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,'spaces:space09') and @title='Settings']
click //a[contains(@href,'spaces:space09') and @title='Settings']
waitForElementPresent //div[@id='UISpaceSettingPortlet']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']
click //div[@id='UISpaceSettingPortlet']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']
waitForElementPresent user
type user mary
click //a[@title='Invite']
waitForElementPresent link=Logout
clickAndWait link=Logout
echo -- Accept the Invite
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username mary
type password gtn
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=My Spaces
clickAndWait link=My 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[contains(text(),'This is description for Space_09')]/following-sibling::ul//a[@title='Accept']
click //div[contains(text(),'This is description for Space_09')]/following-sibling::ul//a[@title='Accept']
waitForElementPresent link=Logout
clickAndWait link=Logout
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username john
type password gtn
clickAndWait id=UIPortalLoginFormAction
echo -- - Verify accepted user is displayed in Member lisr
waitForElementPresent link=Space09
clickAndWait link=Space09
waitForElementPresent //div[@class='NormalTab']//a[contains(@href,'spaces:space09') and @title='Members']
click //div[@class='NormalTab']//a[contains(@href,'spaces:space09') and @title='Members']
waitForElementPresent link=Mary Williams
verifyElementPresent link=Mary Williams
echo -- - Remove user
waitForElementPresent //a[contains(@href,'spaces:space09') and @title='Settings']
click //a[contains(@href,'spaces:space09') and @title='Settings']
waitForElementPresent //div[@id='UISpaceSettingPortlet']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']
click //div[@id='UISpaceSettingPortlet']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']
echo -- Select Mary
waitForElementPresent //td[text()='mary']/ancestor::tr/td/a[@title='Remove']
click //td[text()='mary']/ancestor::tr/td/a[@title='Remove']
waitForTextNotPresent mary
verifyTextNotPresent mary
echo -- Logout
waitForElementPresent link=Logout
clickAndWait link=Logout