Test_SNF_CS13_AddEventForPublicCalendar
open /csdemo
windowMaximize
echo -Add Task For Shared Calendar-
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 to public calendar
waitForElementPresent link=Event
click link=Event
waitForElementPresent //form[@id='UIQuickAddTask']//input[@id='eventName']
type //form[@id='UIQuickAddEvent']//input[@id='eventName'] Test_CS13_Event
type //form[@id='UIQuickAddEvent']//textarea[@id='description'] Test_CS13_Event_description
echo -- Public calendar (users)
select name=calendar label=Default (users)
click link=Save
waitForElementPresent link=Sign out
clickAndWait link=Sign out
echo -- Login john to check the event public
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username demo
type password gtn
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=Agenda
clickAndWait link=Agenda
echo -- Search for and Delete Event
waitForElementPresent value
type value Test_CS13_Event
click //form[@id='UISearchForm']//div[@title='Search']
echo -- View Event
waitForElementPresent //span[@title='Test_CS13_Event']
click //span[@title='Test_CS13_Event']
echo -- Delete Event
waitForElementPresent //div[text()='Test_CS13_Event']/following-sibling::a[contains(@href,'Delete')]
click //div[text()='Test_CS13_Event']/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