Test_SNF_SOC_15_Demo_CheckDisplayingPendingSpaceList
open /socialdemo/public/classic/
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']//div[@class='ButtonMiddle']/a
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 Space15
type description This is description for Space_15
waitForElementPresent link=Create
click link=Create
pause 1000
echo -- Verify space created
waitForElementPresent link=Space15
verifyElementPresent link=Space15
click link=Space15
waitForTextPresent Space15 was created
verifyTextPresent Space15 was created
waitForElementPresent link=Sign out
clickAndWait link=Sign out
echo --Request  to join the Space
open /socialdemo/public/classic/
click link=Sign in
waitForElementPresent username
type username mary
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']//div[@class='ButtonMiddle']/a
waitForElementPresent link=Spaces
click link=Spaces
waitForElementPresent link=Publics
click link=Publics
pause 500
waitForTextPresent This is description for Space_15
verifyTextPresent This is description for Space_15
waitForElementPresent //a[@class='Icon IconAdd']
click //a[@class='Icon IconAdd']
echo -- - Verify requested space is displayed in Space Pending List
waitForElementPresent link=Pendings
click link=Pendings
waitForTextPresent This is description for Space_15
verifyTextPresent This is description for Space_15
waitForElementPresent link=Sign out
clickAndWait link=Sign out
echo -- Delete Space created
open /socialdemo/public/classic/
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']//div[@class='ButtonMiddle']/a
waitForElementPresent link=Spaces
click link=Spaces
waitForElementPresent //div[@id='UIManageMySpaces']/div[2]/div[2]/div[1]/div[1]/a[3]
clickAndWait //div[@id='UIManageMySpaces']/div[2]/div[2]/div[1]/div[1]/a[3]
waitForElementPresent //div[@id='UITabPane']/div[1]/div/div[3]/div/div/div/div
click //div[@id='UITabPane']/div[1]/div/div[3]/div/div/div/div
waitForTextPresent mary
verifyTextPresent mary
waitForElementPresent link=Spaces
click link=Spaces
waitForElementPresent //a[@title='Delete Space']
click //a[@title='Delete Space']
waitForConfirmation Are you sure to delete this space? This can not be undone. All page navigations and this group will be deleted, too.
waitForElementPresent link=Sign out
echo -- Verify space deleted
waitForTextNotPresent Space15
verifyTextNotPresent Space15
clickAndWait link=Sign out