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 //div[@id='UIPortalLoginFormAction']//div[@class='ButtonMiddle']/a
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
click link=Create
pause 1000
echo -- Verify space created
waitForElementPresent link=Space06
verifyElementPresent 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 //form[@id='UIComposer']/div[2]/div[2]/div/a
click //form[@id='UIComposer']/div[2]/div[2]/div/a
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://www.google.com
echo -- Add Comment for activity --
waitForElementPresent link=Comment
click link=Comment
waitForElementPresent //div[3]/textarea
type //div[3]/textarea This is Comment for Activity in Space 06
waitForElementPresent //div[3]/input
click //div[3]/input
waitForTextPresent This is Comment for Activity in Space 06
verifyTextPresent This is Comment for Activity in Space 06
echo -- Delete Commnet--
waitForElementPresent //form/div[2]/div/div[3]/span
click //form/div[2]/div/div[3]/span
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 //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.
echo -- Verify space deleted
waitForTextNotPresent Space06
verifyTextNotPresent Space06
waitForElementPresent link=Sign out
clickAndWait link=Sign out