Test_SNF_CS01_ManageGroup
open /portal/intranet/
windowMaximize
echo -Manage calendar group-
echo -- Login
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait id=UIPortalLoginFormAction
echo -- Agenda
waitForElementPresent link=Agenda
click link=Agenda
echo -- Click Calendar Action
waitForElementPresent //div[@title='Calendar Actions']
click //div[@title='Calendar Actions']
echo -- Add Group
waitForElementPresent //a[contains(@href,'AddCalendarCategory')]
click //a[contains(@href,'AddCalendarCategory')]
waitForElementPresent categoryName
type categoryName Test_01_group
type //div[@class='UIForm UICalendarCategoryForm']//textarea[@id='description'] Test_01_group_description
echo -- Save
waitForElementPresent //form[@id='UICalendarCategoryForm']/div[2]/div/div/a
click //form[@id='UICalendarCategoryForm']/div[2]/div/div/a
waitForTextPresent Test_01_group
verifyTextPresent Test_01_group
echo -- Edit Group: Test_01_group
click //td/div[@title='Test_01_group']/following::td//img[@title='Edit']
waitForElementPresent categoryName
verifyValue categoryName Test_01_group
verifyValue categoryName Test_01_group
verifyValue //div[@class='UIForm UICalendarCategoryForm']//textarea[@id='description'] Test_01_group_description
type categoryName Group 01
type //div[@class='UIForm UICalendarCategoryForm']//textarea[@id='description'] Test_01_group_update_description
waitForElementPresent //form[@id='UICalendarCategoryForm']//a[text()='Save']
click //form[@id='UICalendarCategoryForm']//a[text()='Save']
echo -- Close
waitForElementPresent //form[@id='UICalendarCategoryForm']//a[text()='Close']
click //form[@id='UICalendarCategoryForm']//a[text()='Close']
echo -- Add Canlendar
waitForElementPresent //div[@title='Calendar Actions']
click //div[@title='Calendar Actions']
waitForElementPresent //a[contains(text(),'Add Calendar')]
click //a[contains(text(),'Add Calendar')]
waitForElementPresent displayName
type displayName Test_02_calendar
type //div[@id='calendarDetail']//textarea[@id='description'] Test_02_calendar_description
echo -- Select Test_01_group
waitForElementPresent //select[@name='category']
click //select[@name='category']
select //div[@id='calendarDetail']//select label=Group 01
echo -- Save : Add Calendar
waitForElementPresent //form[@id='UICalendarForm']//a[text()='Save']
click //form[@id='UICalendarForm']//a[text()='Save']
echo -- Edit Calendar
mouseOver //a[@title='Test_02_calendar']
contextMenu //a[@title='Test_02_calendar']
waitForElementPresent //div[@id='tmpMenuElement']//li/a[contains(text(),'Edit')]
click //div[@id='tmpMenuElement']//li/a[contains(text(),'Edit')]
verifyValue displayName Test_02_calendar
type displayName My Calendar 02
type //div[@id='calendarDetail']//textarea[@id='description'] Test_02_calendar_description_edited
echo -- Save Edit.
waitForElementPresent //form[@id='UICalendarForm']//a[text()='Save']
click //form[@id='UICalendarForm']//a[text()='Save']
echo --Delete Calendar
mouseOver //a[@title='My Calendar 02']
contextMenu //a[@title='My Calendar 02']
waitForElementPresent //div[@id='tmpMenuElement']//li/a[contains(text(),'Remove')]
click //div[@id='tmpMenuElement']//li/a[contains(text(),'Remove')]
assertConfirmation Are you sure to delete this calendar and all its events?
echo -- Delete Test_01_group
waitForElementPresent //div[@title='Calendar Actions']
click //div[@title='Calendar Actions']
echo -- Open Group manage form
waitForElementPresent //a[contains(@href,'AddCalendarCategory')]
click //a[contains(@href,'AddCalendarCategory')]
waitForElementPresent //td/div[@title='Group 01']/following::td//img[@title='Delete']
click //td/div[@title='Group 01']/following::td//img[@title='Delete']
assertConfirmation Are you sure to delete this category?
waitForElementPresent //form[@id='UICalendarCategoryForm']//a[text()='Close']
click //form[@id='UICalendarCategoryForm']//a[text()='Close']
echo -- Logout
waitForElementPresent link=Logout
clickAndWait link=Logout