Test_SNF_SOC_06_Demo_ActiononSpaceActivity
open /socialdemo/public/classic/
windowMaximize
echo -- Add Action on Space Activites
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
echo -- Add a new Space
waitForElementPresent link=Spaces
clickAndWait link=Spaces
waitForElementPresent link=Add New Space
click link=Add New Space
waitForElementPresent displayName
type displayName Space06
type description This is description for Space_06
waitForElementPresent link=Create
clickAt link=Create 2,2
pause 2000
echo -- Verify space created
waitForElementPresent link=Space06
click link=Space06
waitForTextPresent Space06 was created
verifyTextPresent Space06 was created
echo -- Add Activites and Share link
pause 1000
waitForElementPresent composerInput
type composerInput This is activity for Space 06
waitForElementPresent //a[@title='Share Link']
click //a[@title='Share Link']
waitForElementPresent InputLink
type InputLink http://google.com
waitForElementPresent AttachButton
click AttachButton
pause 1000
waitForElementPresent ShareButton
click ShareButton
echo -- Verify activity is added
waitForTextPresent This is activity for Space 06
verifyTextPresent This is activity for Space 06
verifyElementPresent link=Google
verifyTextPresent Source : http://google.com
echo -- Add Comment for activity --
waitForElementPresent link=Comment
click link=Comment
echo -- Type comment --
waitForElementPresent document.forms[1].elements[1]
type document.forms[1].elements[1] This is Comment for Activity in Space 06
echo -- Press Comment button
waitForElementPresent //div[3]/div/input
click //div[3]/div/input
waitForTextPresent This is Comment for Activity in Space 06
verifyTextPresent This is Comment for Activity in Space 06
echo -- Delete Commnet--
waitForElementPresent css=span.CloseCMContentHilight
click css=span.CloseCMContentHilight
assertConfirmation Are you sure to delete this comment?
waitForTextNotPresent This is Comment for Activity in Space 06
verifyTextNotPresent This is Comment for Activity in Space 06
echo -- Like and Unlike Activity
verifyElementPresent link=Like
click link=Like
waitForTextPresent You like this.
verifyTextPresent You like this.
verifyElementPresent link=Unlike
click link=Unlike
waitForTextNotPresent You like this.
verifyTextNotPresent You like this.
echo -- Delete Space created
click link=Spaces
waitForElementPresent //div//a[text()='Space06']/ancestor::div/ul//a[@title='Delete']
click //div//a[text()='Space06']/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 Space06
verifyTextNotPresent Space06
echo -- Sign out
waitForElementPresent link=Sign out
clickAndWait link=Sign out