Test_SNF_SOC_02_Demo_CreateEditDeleteSpace
open /portal/public/intranet/
windowMaximize
echo -- Add_Edit_Delete a new Space --
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
echo --Log in
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 //div[@id='UIPopupAddSpace']//input[@id='displayName']
type //div[@id='UIPopupAddSpace']//input[@id='displayName'] testsnfsoc02
waitForElementPresent link=Create
click link=Create
pause 30000
waitForElementPresent link=testsnfsoc02
click link=testsnfsoc02
waitForElementPresent link=My Spaces
clickAndWait link=My Spaces
echo -- Verify space created
waitForElementPresent link=testsnfsoc02
clickAndWait link=testsnfsoc02
waitForTextPresent testsnfsoc02 was created
verifyTextPresent testsnfsoc02 was created
echo -- Edit Space created
waitForElementPresent //a[contains(@href,'testsnfsoc02/settings')]
clickAndWait //a[contains(@href,'testsnfsoc02/settings')]
waitForElementPresent displayName testsnfsoc02
type description This is description for Space_02_Edit
waitForElementPresent link=Save
click link=Save
waitForTextPresent Update info of space successful.
verifyTextPresent Update info of space successful.
waitForElementPresent link=OK
click link=OK
echo -- back to space link--
waitForElementPresent link=My Spaces
clickAndWait link=My Spaces
echo -- verify new edited name of space--
waitForTextPresent This is description for Space_02_Edit
verifyTextPresent This is description for Space_02_Edit
echo -- Delete Space created
waitForElementPresent link=My Spaces
clickAndWait link=My Spaces
waitForElementPresent //div/a[text()='testsnfsoc02']/ancestor::div/ul//a[@title='Delete']
click //div/a[text()='testsnfsoc02']/ancestor::div/ul//a[@title='Delete']
assertConfirmation Are you sure to delete this space? This can not be undone. All page navigations and this group will be deleted, too.
echo -- Verify space deleted
waitForTextNotPresent testsnfsoc02
verifyTextNotPresent testsnfsoc02
waitForElementPresent link=Logout
clickAndWait link=Logout