Test_SNF_CS06_ManageEvent
open /csdemo
windowMaximize
echo -Manage Event-
echo -- Login
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait id=UIPortalLoginFormAction
echo -- Agenda
waitForElementPresent link=Agenda
clickAndWait link=Agenda
echo -- Add Event
waitForElementPresent link=Event
click link=Event
echo -- Type event name
waitForElementPresent eventName
type eventName Test_CS06_Event
type //div[@class='FormContainer']//textarea[@id='description'] Test_CS06_Event_description
waitForElementPresent link=Save
click link=Save
echo -- Search Event
waitForElementPresent value
type value Test_CS06_Event
click //form[@id='UISearchForm']//div[@title='Search']
echo -- View Event
waitForElementPresent //span[@title='Test_CS06_Event']
click //span[@title='Test_CS06_Event']
echo --  Edit Event
waitForElementPresent //div[text()='Test_CS06_Event']/following-sibling::a[contains(@href,'Edit')]
click //div[text()='Test_CS06_Event']/following-sibling::a[contains(@href,'Edit')]
echo --  Change content of event
waitForElementPresent //div[@id='UIPopupAddEventContainer']//input[@id='eventName']
type //div[@id='UIPopupAddEventContainer']//input[@id='eventName'] Test_CS06_Event_Edited
type //div[@id='UIPopupAddEventContainer']//textarea[@id='description'] Test_CS06_Event_description_Edited
echo --  Save
waitForElementPresent css=div.HorizontalLayout > div.UIAction > a.ActionButton.LightBlueStyle
click css=div.HorizontalLayout > div.UIAction > a.ActionButton.LightBlueStyle
echo --  Confirm Save
waitForElementPresent //form[@id='UIConfirmForm']/div[2]/div/div/a[2]
click //form[@id='UIConfirmForm']/div[2]/div/div/a[2]
waitForTextPresent Test_CS06_Event_Edited
verifyTextPresent Test_CS06_Event_Edited
echo -- Delete Event
waitForElementPresent //div[text()='Test_CS06_Event_Edited']/following-sibling::a[contains(@href,'Delete')]
click //div[text()='Test_CS06_Event_Edited']/following-sibling::a[contains(@href,'Delete')]
assertConfirmation Are you sure to delete this event/task?
echo -- Sign out
waitForElementPresent link=Sign out
clickAndWait link=Sign out