Test_SNF_SOC_12_Demo_LeaveSpace
open /portal/public/intranet/
windowMaximize
echo -- Leave Space
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username mary
type password gtn
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 Space12
type description This is description for Space_12
click link=Create
pause 30000
echo -- Verify space created
waitForElementPresent link=Space12
click link=Space12
waitForTextPresent Space12 was created
verifyTextPresent Space12 was created
echo -- Invite a user to join the Space
waitForElementPresent //a[contains(@href,'spaces:space12') and @title='Settings']
click //a[contains(@href,'spaces:space12') 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 john
waitForElementPresent //a[@title='Invite']
click //a[@title='Invite']
waitForElementPresent //a[@title='Revoke Invited' and contains(@onclick,'objectId=john')]
verifyElementPresent //a[@title='Revoke Invited' and contains(@onclick,'objectId=john')]
waitForElementPresent link=Logout
clickAndWait link=Logout
echo -- Accept the Invite
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username john
type password gtn
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=My Spaces
clickAndWait link=My Spaces
waitForElementPresent link=Received Invitations
clickAndWait link=Received Invitations
waitForElementPresent //div[contains(text(),'This is description for Space_12')]/following-sibling::ul//a[@title='Accept']
click //div[contains(text(),'This is description for Space_12')]/following-sibling::ul//a[@title='Accept']
echo -- Verify Accept the Invite successfully
waitForElementPresent link=My Spaces
clickAndWait link=My Spaces
waitForTextPresent This is description for Space_12
verifyTextPresent This is description for Space_12
echo -- Leave Space
waitForElementPresent //div[contains(text(),'This is description for Space_12')]/following-sibling::ul//a[@title='Leave']
click //div[contains(text(),'This is description for Space_12')]/following-sibling::ul//a[@title='Leave']
waitForTextNotPresent This is description for Space_12
verifyTextNotPresent This is description for Space_12
echo -- Log out
waitForElementPresent link=Logout
clickAndWait link=Logout