Test_SNF_SOC_10_Demo_ChangeMemberRole
open /socialdemo/public/classic/
windowMaximize
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 Space10
type description This is description for Space_10
waitForElementPresent link=Create
clickAt link=Create 2,2
echo -- Verify space created
waitForElementPresent link=Space10
click link=Space10
waitForTextPresent Space10 was created
verifyTextPresent Space10 was created
echo -- Invite a user to join the Space
waitForElementPresent //a[contains(@href,'space10/settings')]
click //a[contains(@href,'space10/settings')]
waitForElementPresent //div[text()='Members']
click //div[text()='Members']
waitForElementPresent user
type user mary
waitForElementPresent //form[@id='UISpaceMember']/div[2]/div/a[2]
click //form[@id='UISpaceMember']/div[2]/div/a[2]
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
click link=Received Invitations
pause 500
echo -- Verify your Space Invitation is displayed
waitForTextPresent This is description for Space_10
verifyTextPresent This is description for Space_10
waitForElementPresent //div/a[text()='Space10']/following::ul//a[@title='Accept']
click //div/a[text()='Space10']/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_10
verifyTextPresent This is description for Space_10
waitForElementPresent link=Sign out
clickAndWait link=Sign out
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
echo -- - Verify accepted user is displayed in Member lisr
waitForElementPresent //a[contains(@href,'space10/members')]
click //a[contains(@href,'space10/members')]
waitForElementPresent link=Mary Kelly
verifyElementPresent link=Mary Kelly
echo -- Make user become space's leader--
waitForElementPresent //a[contains(@href,'space10/settings')]
click //a[contains(@href,'space10/settings')]
waitForElementPresent //div[text()='Members']
click //div[text()='Members']
echo -- Make Leader for Mary
waitForElementPresent //td[text()='mary']/following::td/a[@title='Make Leader']
click //td[text()='mary']/following::td/a[@title='Make Leader']
waitForElementPresent //td[text()='mary']/following::td/a[@title='Remove Leader']
verifyElementPresent //td[text()='mary']/following::td/a[@title='Remove Leader']
echo --Check access Space setting--
waitForElementPresent link=Sign out
clickAndWait link=Sign out
click link=Sign in
waitForElementPresent username
type username mary
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
waitForElementPresent link=Spaces
clickAndWait link=Spaces
waitForElementPresent link=Space10
click link=Space10
waitForElementPresent //a[contains(@href,'space10/settings')]
click //a[contains(@href,'space10/settings')]
waitForTextPresent Space Navigation
verifyTextPresent Space Navigation
echo -- Delete Space created
waitForElementPresent link=Sign out
clickAndWait link=Sign out
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
waitForElementPresent link=Spaces
clickAndWait link=Spaces
waitForElementPresent //div//a[text()='Space10']/ancestor::div/ul//a[@title='Delete']
click //div//a[text()='Space10']/ancestor::div/ul//a[@title='Delete']
waitForConfirmation Cannot undo one deleted space with all its page navigations and group. Are you sure to delete this space?
echo -- Verify space deleted
waitForTextNotPresent Space10
verifyTextNotPresent Space10
waitForElementPresent link=Sign out
clickAndWait link=Sign out