Test_SNF_ECMS_86_DisapproveHolidayProcess_ecmdemo
open /portal/public/acme/
windowMaximize
echo -- Log in
click link=Login
waitForElementPresent username
type username mary
type password gtn
clickAndWait link=Sign in
echo -- Create a holiday request
clickAndWait link=Business Process Controller
click //div[@id='UIControllerManager']/div/div/div[1]/div/div/div/div/div[2]/div/div/div/div
click //img[@title='Manage Start']
waitForElementPresent //table[@class='UIFormGrid']/tbody/tr[2]/td[@class='FieldComponent']/input[@type='text']
click //table[@class='UIFormGrid']/tbody/tr[2]/td[@class='FieldComponent']/input[@type='text']
click link=30
click link=Submit
clickAndWait link=Sign out
echo -- Login by administration
click link=Login
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
echo -- Open form and disapprove request
clickAndWait link=Business Process Controller
click link=Manage
waitForElementPresent link=Disapprove
click link=Disapprove
clickAndWait link=Sign out
echo -- Log in by creator
click link=Login
waitForElementPresent username
type username mary
type password gtn
clickAndWait link=Sign in
echo -- Open form and modify request
clickAndWait link=Business Process Controller
click link=Manage
waitForElementPresent //table[@class='UIFormGrid']/tbody/tr[2]/td[@class='FieldComponent']/input[@type='text']
click //table[@class='UIFormGrid']/tbody/tr[2]/td[@class='FieldComponent']/input[@type='text']
click link=29
click link=Modify
clickAndWait link=Sign out
echo -- Login by admin again
click link=Login
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
echo -- Open form and approve request
clickAndWait link=Business Process Controller
click link=Manage
waitForElementPresent link=Approve
click link=Approve
echo add James in HR
clickAndWait link=Users and groups management
waitForElementPresent //div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[2]
click //div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[2]
waitForElementPresent //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a
click //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a
waitForElementPresent link=Management
click link=Management
waitForElementPresent link=Human Resources
click link=Human Resources
waitForElementPresent //form[@id='UIGroupMembershipForm']/div[2]/div/table/tbody/tr[1]/td[2]/a
click //form[@id='UIGroupMembershipForm']/div[2]/div/table/tbody/tr[1]/td[2]/a
waitForElementPresent james
click james
waitForElementPresent //form[@id='UIUserSelector']/div[2]/div[2]/table/tbody/tr/td/a[1]/div/div/div
click //form[@id='UIUserSelector']/div[2]/div[2]/table/tbody/tr/td/a[1]/div/div/div
waitForElementPresent //form[@id='UIGroupMembershipForm']/div[2]/div/div/table/tbody/tr/td/div/div/div/div
click //form[@id='UIGroupMembershipForm']/div[2]/div/div/table/tbody/tr/td/div/div/div/div
clickAndWait link=Sign out
echo -- Validate by human resource
click link=Login
waitForElementPresent username
type username james
type password gtn
clickAndWait link=Sign in
clickAndWait link=Business Process Controller
click link=Manage
waitForElementPresent link=Read
click link=Read
echo -- Log out
waitForElementPresent link=Sign out
clickAndWait link=Sign out
echo -- Log in by Administration remove James
waitForElementPresent link=Login
click link=Login
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
waitForElementPresent link=Users and groups management
clickAndWait link=Users and groups management
waitForElementPresent //div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[2]
click //div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[2]
waitForElementPresent //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a
click //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a
waitForElementPresent link=Management
click link=Management
waitForElementPresent link=Human Resources
click link=Human Resources
click //img[@alt='DeleteUser']
assertConfirmation Are you sure you want to delete user james from group organization/management/human-resources?
echo -- Log out end
waitForElementPresent link=Sign out
clickAndWait link=Sign out