Test_SNF_CS12_AddTaskForSharedCalendar
open /portal/public/intranet
windowMaximize
waitForElementPresent //div[2]/div[2]/div[1]/div/div/div[1]
click //div[2]/div[2]/div[1]/div/div/div[1]
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/calendar
pause 10000
echo -Add Task For Shared Calendar-
echo -- Share Calendar
waitForElementPresent //div[@title='Default']
mouseOver //div[@title='Default']
contextMenu //div[@title='Default']
waitForElementPresent link=Share
click link=Share
waitForElementPresent username
type username demo
click canEdit
click //form[@id='UISharedForm']/div[2]/div/div/table/tbody/tr/td/div[1]/div/div/div
click //div[@id='UICalendarPopupWindow']/div/div[1]//div[2]
waitForElementPresent //div[@class='SharedCalendarIcon']
clickAndWait link=Logout
echo -- Login demo to add task to shard calendar
waitForElementPresent //div[2]/div[2]/div[1]/div/div/div[1]
click //div[2]/div[2]/div[1]/div/div/div[1]
waitForElementPresent username
type username demo
waitForElementPresent password
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/calendar
pause 10000
waitForElementPresent //div[@title='root- Default']
echo -- Add task to shared calendar
waitForElementPresent link=Task
click link=Task
waitForElementPresent //form[@id='UIQuickAddTask']//input[@id='eventName']
type //form[@id='UIQuickAddTask']//input[@id='eventName'] Test_CS12_Task
type //form[@id='UIQuickAddTask']//textarea[@id='description'] Test_CS12_Task_description
select //form[@id='UIQuickAddTask']/div[2]/div/table/tbody/tr[6]/td[2]/select label=root - Default
click //div[@id='QuickAddEventContainer']/div[2]/table/tbody/tr/td/div[3]/div/div/div
click //div[4]/div/div[2]/div/div/div/div/div/div/div[2]/table/tbody/tr/td/div[1]/div/div/div
clickAndWait link=Logout
echo -- Login root to check the task added by the other
waitForElementPresent //div[2]/div[2]/div[1]/div/div/div[1]
click //div[2]/div[2]/div[1]/div/div/div[1]
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/calendar
pause 10000
echo -- Search for and Delete Task
waitForElementPresent value
type value Test_CS12_Task
click //form[@id='UISearchForm']//div[@title='Search']
waitForElementPresent //div[@class='UIListView SpliterResizableListArea']//tr[@class='UIListViewRow']
click //div[@class='UIListView SpliterResizableListArea']//tr[@class='UIListViewRow']
waitForElementPresent //table[@id='RowContainerDay']//div[@class='IconHolder DeleteTaskIcon']
click //table[@id='RowContainerDay']//div[@class='IconHolder DeleteTaskIcon']
assertConfirmation Are you sure you want to delete?
echo -- Remove shared calendar
waitForElementPresent //div[@title='Default']
mouseOver //div[@title='Default']
contextMenu //div[@title='Default']
waitForElementPresent link=Share
click link=Share
click //img[@alt='Delete']
assertConfirmation The category will be deleted. Do you confirm ?
waitForElementPresent //div[@id='UICalendarPopupWindow']/div/div[1]//div[2]
click //div[@id='UICalendarPopupWindow']/div/div[1]//div[2]
waitForElementPresent //div[@title='Default']
verifyElementNotPresent //div[@class='SharedCalendarIcon']
clickAndWait link=Logout
close