SOC_SPC_SocDemo_09.003_ManagerOfSpaceLeavesSpace WhenOnlyHasOneMemberInSpace
echo --SOC_SPC_SocDemo_09.003_ManagerOfSpaceLeavesSpace WhenOnlyHasOneMemberInSpace.html --
open /socialdemo/public/classic/
echo -- sign in--
click link=Sign in
waitForElementPresent username
type username john
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- add new space--
clickAndWait link=Spaces
click link=Add New Space
waitForElementPresent name
type name LeaveSpace
type description Manager leaves space
click link=Create
pause 2000
echo -- access space--
waitForElementPresent //div[@id='UIManageMySpaces']/div[2]/div[2]/div[1]/div[1]/div[1]/a
clickAndWait //div[@id='UIManageMySpaces']/div[2]/div[2]/div[1]/div[1]/div[1]/a
clickAndWait //div[@id='UISpaceMenu']/div/div[5]/a/span
pause 1000
clickAndWait link=Spaces
echo -- leave space when has only manager is leader of the space--
waitForElementPresent //div[@id='UIManageMySpaces']/div[2]/div[2]/div[1]/div[1]/a[2]
click //div[@id='UIManageMySpaces']/div[2]/div[2]/div[1]/div[1]/a[2]
echo -- verify text--
waitForTextPresent You can not leave this space when you are the only leader.
verifyTextPresent You can not leave this space when you are the only leader.
click link=OK
echo --delete space to clean data--
click //div[2]/div[2]/div[1]/div[1]/a[1]
assertConfirmation Are you sure to delete this space? This can not be undone. All page navigations and this group will be deleted, too.
clickAndWait link=Sign out