Test_SNF_SOC_28_Demo_DragDropGadgetinDashboard
open /socialdemo/public/classic/
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
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 Space28
type description This is description for Space_28
waitForElementPresent link=Create
clickAt link=Create 2,2
pause 12000
waitForElementPresent link=Space28
click link=Space28
waitForElementPresent //a[contains(@href,'space28/dashboard')]
clickAndWait //a[contains(@href,'space28/dashboard')]
pause 200
echo --Add gadgets into dashboard page
waitForElementPresent link=Add Gadgets
click link=Add Gadgets
pause 200
echo --Choose "root" node
echo --By Url--
waitForElementPresent xpath=//input[@id='url']
type xpath=//input[@id='url'] http://www.google.com/ig/modules/datetime.xml
waitForElementPresent xpath=//img[@class='AddNewNodeIcon']
click xpath=//img[@class='AddNewNodeIcon']
pause 500
verifyElementPresent xpath=//div[@class='GadgetTitle']
echo -- Close Dashboard Workspace--
waitForElementPresent css=a.CloseButton
click css=a.CloseButton
echo --Delete gadget--
waitForElementPresent css=span.CloseGadget.IconControl
click css=span.CloseGadget.IconControl
assertConfirmation Are you sure to delete this gadget?
pause 1000
echo --By drag and drop
waitForElementPresent link=Add Gadgets
click link=Add Gadgets
waitForElementPresent xpath=//div[@class='GadgetTitle' and @title='Calculator']
dragAndDropToObject xpath=//div[@class='GadgetTitle' and @title='Calculator'] xpath=//div[@class='UIDashboardContainer']
pause 1000
waitForElementPresent css=a.CloseButton
click css=a.CloseButton
waitForTextPresent Calculator
verifyTextPresent Calculator
echo -- Delete Drag and drop Gadget
waitForElementPresent css=span.CloseGadget.IconControl
click css=span.CloseGadget.IconControl
waitForConfirmation Are you sure to delete this gadget?
verifyTextPresent Drag your gadgets here.
echo --  Sign out
waitForElementPresent link=Sign out
clickAndWait link=Sign out