Test_SNF_CS05_ManageCategory
open /csdemo
windowMaximize
echo -Manage Event Category-
echo -- Login
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait id=UIPortalLoginFormAction
echo -- Add Event Category
waitForElementPresent link=Agenda
clickAndWait link=Agenda
waitForElementPresent //div[@class='AddCategoryIcon']
click //div[@class='AddCategoryIcon']
waitForElementPresent eventCategoryName
type eventCategoryName Test_SNF_CS05
type //form[@id='UIEventCategoryForm']/div[2]/div/table/tbody/tr[2]/td[2]/textarea Test_SNF_CS05_Description
echo -- Save Category
waitForElementPresent css=div.FormContainer > div.UIAction > a.ActionButton.LightBlueStyle
click css=div.FormContainer > div.UIAction > a.ActionButton.LightBlueStyle
echo -- Edit Event Category
waitForElementPresent //td/div[@title='Test_SNF_CS05']/following::td//img[@title='Edit']
click //td/div[@title='Test_SNF_CS05']/following::td//img[@title='Edit']
waitForElementPresent eventCategoryName
type eventCategoryName Test_SNF_CS05_Edit
type //form[@id='UIEventCategoryForm']/div[2]/div/table/tbody/tr[2]/td[2]/textarea Test_SNF_CS05_Description_Edit
echo -- Save
waitForElementPresent css=div.FormContainer > div.UIAction > a.ActionButton.LightBlueStyle
click css=div.FormContainer > div.UIAction > a.ActionButton.LightBlueStyle
waitForTextPresent Test_SNF_CS05_Edit
echo -- Delete Event Category
waitForElementPresent //td/div[@title='Test_SNF_CS05_Edit']/following::td//img[@title='Delete']
click //td/div[@title='Test_SNF_CS05_Edit']/following::td//img[@title='Delete']
assertConfirmation Are you sure to delete this category?
waitForTextNotPresent Test_SNF_CS05_Edit
click link=Close
echo -- Sign out
waitForElementPresent link=Sign out
clickAndWait link=Sign out