Test_SNF_ECMS_83_GrantPayraise_ecmdemo
open /ecmdemo/public/acme/
windowMaximize
echo -- Log in
click link=Login
waitForElementPresent username
type username mary
type password gtn
clickAndWait link=Sign in
echo -- Create a pay raise request
waitForElementPresent link=Business Process Controller
clickAndWait link=Business Process Controller
echo --  BP Definition Controller
waitForElementPresent //div[@id='UIControllerManager']//div[contains(text(),"BP Definition Controller")]
click //div[@id='UIControllerManager']//div[contains(text(),"BP Definition Controller")]
echo --  pay raise process
waitForElementPresent //div[@id='UIBPDefinition']/table/tbody/tr[2]/td[4]/div/img
click //div[@id='UIBPDefinition']/table/tbody/tr[2]/td[4]/div/img
waitForElementPresent amount-asked
type amount-asked 5000
type reason to repair machine
waitForElementPresent link=Submit
click link=Submit
pause 1000
echo -- Log out
waitForElementPresent link=Sign out
clickAndWait link=Sign out
pause 3000
echo -- Log in by admin
waitForElementPresent link=Login
click link=Login
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
echo - Open form to manage task
waitForElementPresent link=Business Process Controller
clickAndWait link=Business Process Controller
echo - Manage
waitForElementPresent link=Manage
click link=Manage
echo -- Grand a pay raise
waitForElementPresent amount-granted
type amount-granted 5000
waitForElementPresent link=Grant
click link=Grant
pause 1000
echo Add James into HR
waitForElementPresent link=Users and Groups Manager
clickAndWait link=Users and Groups Manager
waitForElementPresent link=Group Management
click link=Group Management
waitForElementPresent //a[@title="Organization"]
click //a[@title="Organization"]
waitForElementPresent //a[@title="Management"]
click //a[@title="Management"]
waitForElementPresent link=Human Resources
click link=Human Resources
waitForElementPresent //a[@title="Select User"]
click //a[@title="Select User"]
waitForNotChecked james
click james
waitForElementPresent //form[@id='UIUserSelector']/div[2]/div[2]/a[1]
click //form[@id='UIUserSelector']/div[2]/div[2]/a[1]
waitForSelectedValue membership member
select membership label=author
waitForElementPresent link=Save
click link=Save
pause 1000
echo -- Log out
waitForElementPresent link=Sign out
clickAndWait link=Sign out
echo -- Login by human resource
waitForElementPresent link=Login
click link=Login
waitForElementPresent username
type username james
type password gtn
clickAndWait link=Sign in
echo -- Open form to manage task
waitForElementPresent link=Business Process Controller
clickAndWait link=Business Process Controller
echo --Manage - Must add James into HR
waitForElementPresent link=Manage
click link=Manage
echo -- Finish task
waitForElementPresent amount-granted
type amount-granted 5000
waitForElementPresent //a[contains(text(),'Finish it')]
click //a[contains(text(),'Finish it')]
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 Manager
clickAndWait link=Users and Groups Manager
waitForElementPresent link=Group Management
click link=Group Management
waitForElementPresent //a[@title="Organization"]
click //a[@title="Organization"]
waitForElementPresent link=Management
click link=Management
waitForElementPresent link=Human Resources
click link=Human Resources
waitForElementPresent //img[@alt='DeleteUser']
click //img[@alt='DeleteUser']
assertConfirmation Are you sure to delete user james from group organization/management/human-resources?
echo -- Log out end
waitForElementPresent link=Sign out
click link=Sign out
open /ecmdemo/public/acme/
windowMaximize
echo -- Log in
click link=Login
waitForElementPresent username
type username mary
type password gtn
clickAndWait link=Sign in
echo -- Create a pay raise request
waitForElementPresent link=Business Process Controller
clickAndWait link=Business Process Controller
echo --  BP Definition Controller
waitForElementPresent //div[@id='UIControllerManager']//div[contains(text(),"BP Definition Controller")]
click //div[@id='UIControllerManager']//div[contains(text(),"BP Definition Controller")]
echo --  pay raise process
waitForElementPresent //div[@id='UIBPDefinition']/table/tbody/tr[2]/td[4]/div/img
click //div[@id='UIBPDefinition']/table/tbody/tr[2]/td[4]/div/img
waitForElementPresent amount-asked
type amount-asked 5000
type reason to repair machine
waitForElementPresent link=Submit
click link=Submit
pause 1000
echo -- Log out
waitForElementPresent link=Sign out
clickAndWait link=Sign out
pause 1000
echo -- Log in by admin
waitForElementPresent link=Login
click link=Login
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
echo - Open form to manage task
waitForElementPresent link=Business Process Controller
clickAndWait link=Business Process Controller
echo - Manage
waitForElementPresent link=Manage
click link=Manage
echo -- Grand a pay raise
type amount-granted 3000
waitForElementPresent link=Grant
click link=Grant
pause 1000
echo Add James into HR
waitForElementPresent link=Users and Groups Manager
clickAndWait link=Users and Groups Manager
echo -- Choose Group Management --
waitForElementPresent link=Group Management
click link=Group Management
echo -- Choose Organization --
waitForElementPresent //a[@title='Organization']
click //a[@title='Organization']
waitForElementPresent //a[@title='Management']
click //a[@title='Management']
waitForElementPresent link=Human Resources
click link=Human Resources
waitForElementPresent //a[@title="Select User"]
click //a[@title="Select User"]
waitForNotChecked james
click james
waitForElementPresent link=Add
click link=Add
waitForValue username james
verifyValue username james
waitForSelectedValue membership member
select membership label=author
waitForElementPresent link=Save
click link=Save
pause 1000
echo -- Log out
waitForElementPresent link=Sign out
clickAndWait link=Sign out
echo -- Login by human resource
waitForElementPresent link=Login
click link=Login
waitForElementPresent username
type username james
type password gtn
clickAndWait link=Sign in
echo -- Open form to manage task
waitForElementPresent link=Business Process Controller
clickAndWait link=Business Process Controller
echo --Manage - Must add James into HR
waitForElementPresent link=Manage
click link=Manage
echo -- Finish task
waitForElementPresent amount-granted
type amount-granted 5000
waitForElementPresent //a[contains(text(),'Finish it')]
click //a[contains(text(),'Finish it')]
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 Manager
clickAndWait link=Users and Groups Manager
echo -- Choose Group Management --
waitForElementPresent link=Group Management
click link=Group Management
echo -- Choose Organization --
waitForElementPresent //a[@title='Organization']
click //a[@title='Organization']
waitForElementPresent //a[@title='Management']
click //a[@title='Management']
waitForElementPresent link=Human Resources
click link=Human Resources
waitForElementPresent //img[@alt='DeleteUser']
click //img[@alt='DeleteUser']
assertConfirmation Are you sure to delete user james from group organization/management/human-resources?
echo -- Log out end
waitForElementPresent link=Sign out
clickAndWait link=Sign out