Test_SNF_SOC_14_Demo_CheckDisplayingInvitationSpaceList
open /portal/public/intranet/
windowMaximize
echo --  Display your Space Invitation
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
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 Space14
type description This is description for Space_14
click link=Create
pause 20000
echo -- Verify space created
waitForElementPresent link=Space14
click link=Space14
waitForTextPresent Space14 was created
verifyTextPresent Space14 was created
echo -- Invite a user to join the Space
waitForElementPresent //a[contains(@href,'spaces:space14') and @title='Settings']
click //a[contains(@href,'spaces:space14') 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_14
verifyTextPresent This is description for Space_14
echo -- Accept option displays
waitForElementPresent //div[contains(text(),'This is description for Space_14')]/following-sibling::ul//a[@title='Accept']
verifyElementPresent //div[contains(text(),'This is description for Space_14')]/following-sibling::ul//a[@title='Accept']
echo -- Deny option displays
waitForElementPresent //div[contains(text(),'This is description for Space_14')]/following-sibling::ul//a[@title='Deny']
verifyElementPresent //div[contains(text(),'This is description for Space_14')]/following-sibling::ul//a[@title='Deny']
echo -- Log out
waitForElementPresent link=Logout
clickAndWait link=Logout