Test_SMOKE_CS01_CalendarAction
open /portal/public/classic/
windowMaximize
echo - Calendar basic actions
echo -- Login
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Goto Calendar portlet
waitForElementPresent link=Agenda
clickAndWait link=Agenda
waitForElementPresent //div[@onclick='eXo.calendar.UICalendarPortlet.showMainMenu(this, event);']
click //div[@onclick='eXo.calendar.UICalendarPortlet.showMainMenu(this, event);']
echo -- Create a Group
waitForElementPresent tmpMenuElement
click //div[@id='tmpMenuElement']/div/div[2]/div/div/div[1]/a
waitForElementPresent categoryName
type categoryName CS_Smoke_01
type //form[@id='UICalendarCategoryForm']/div[2]/div/table/tbody/tr[2]/td[2]/textarea CS_Smoke_01_Des
click link=Save
waitForElementPresent //div[@title="CS_Smoke_01"]
click //form[@id='UICalendarCategoryForm']/div[2]/div/div/table/tbody/tr/td/div[3]/div/div/div
click //div[@onclick='eXo.calendar.UICalendarPortlet.showMainMenu(this, event);']
echo -- Create a calendar
waitForElementPresent tmpMenuElement
click //div[@id='tmpMenuElement']/div/div[2]/div/div/div[2]/a
waitForElementPresent displayName
type displayName CS_Smoke_01
type //div[@id='calendarDetail']/table/tbody/tr[2]/td[2]/textarea CS_Smoke_01_Des
click link=Save
echo -- Create a event
click link=Event
waitForElementPresent eventName
type eventName CS_Smoke_01
type description CS_Smoke_01
click //div[@id='QuickAddEventContainer']/div[2]/table/tbody/tr/td/div[1]/div/div/div
echo -- View event
mouseOver //div[@class="EventContainer"]
contextMenu //div[@class="EventContainer"] contexdMenu
waitForElementPresent link=View
click link=View
waitForElementPresent //span/div/div/div[1]/div/div/div/div[2]
click //span/div/div/div[1]/div/div/div/div[2]
echo -- View calendar in different view
click link=Today
click link=Day
click link=Week
click link=Month
click link=Year
click link=List
echo -- Delete test data
waitForElementPresent //form[@id='UICalendars']/div[2]/div[1]
click //div[@onclick='eXo.calendar.UICalendarPortlet.showMainMenu(this, event);']
waitForElementPresent //div[@id='tmpMenuElement']/div/div[2]/div/div/div[1]/a
click //div[@id='tmpMenuElement']/div/div[2]/div/div/div[1]/a
waitForElementPresent //tr[2]/td[2]/div/img[2]
click //tr[2]/td[2]/div/img[2]
assertConfirmation The category will be deleted. Do you confirm ?
click link=Close
mouseOver //div[@title="CS_Smoke_01"]
contextMenu //div[@title="CS_Smoke_01"] contextmenu
waitForElementPresent link=Remove
click link=Remove
assertConfirmation The calendar and all its events and tasks. Do you confirm?
click value
type value CS
click //form[@id='UISearchForm']/div[2]/div[2]/div
mouseOver //span[@title='CS_Smoke_01']
contextMenu //span[@title='CS_Smoke_01'] contextMenu
waitForElementPresent tmpMenuElement
click //div[@id='tmpMenuElement']/div/div[2]/div/div/a[3]/div
assertConfirmation Are you sure you want to delete?
echo -- Sign out
clickAndWait link=Logout
close