CreateModifyRole
setTimeout 45000
store javascript{Math.floor(Math.random()*11000)} randomSuffix
store javascript{Math.floor(Math.random()*11000)} randomSuffix2
open index.php/configuration
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertTextPresent Roles
assertTextPresent Manage Roles
clickAndWait //div[@id='ConfigureModulesMenuView']/ul/li[12]/a/span
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
clickAndWait //div[@id='ActionBarForRolesTreeListView']/div/div/a
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
type Role_name testRole${randomSuffix}
clickAndWait save
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Roles Home
assertTextPresent testRole${randomSuffix}
clickAndWait link=testRole${randomSuffix}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertValue Role_name testRole${randomSuffix}
clickAndWait link=Cancel
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertTextPresent Roles Home
clickAndWait //div[@id='ActionBarForRolesTreeListView']/div/div/a
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
type Role_name testRole${randomSuffix2}
click Role_role_SelectLink
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Select a Parent Role
click link=testRole${randomSuffix}
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForValue Role_role_name testRole${randomSuffix}
clickAndWait save
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Roles Home
assertTextPresent Roles Home
assertText link=testRole${randomSuffix} testRole${randomSuffix}
clickAndWait link=testRole${randomSuffix2}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertValue Role_name testRole${randomSuffix2}
assertValue Role_role_name testRole${randomSuffix}
clickAndWait save
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
open index.php/configuration
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertTextPresent Users - Manage Users
clickAndWait //div[@id='ConfigureModulesMenuView']/ul/li[13]/a/span
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
clickAndWait //div[@id='UsersActionBarForSearchAndListView']/div/div/a[1]
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
select UserPasswordForm_title_value label=Mr.
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
type UserPasswordForm_firstName Jhon
type UserPasswordForm_lastName Smith${randomSuffix}
type UserPasswordForm_username jhon smith${randomSuffix}
type UserPasswordForm_newPassword abc123
type UserPasswordForm_newPassword_repeat abc123
clickAndWait save
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertText link=Edit Edit
assertText //div[@id='UserDetailsView']/div/h1 Jhon Smith${randomSuffix}
open index.php/users/default
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
verifyTextPresent Advanced
type UsersSearchForm_anyMixedAttributes jhon smith${randomSuffix}
keyUp UsersSearchForm_anyMixedAttributes \10
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Jhon Smith${randomSuffix}
assertText link=Jhon Smith${randomSuffix} Jhon Smith${randomSuffix}
clickAndWait link=Jhon Smith${randomSuffix}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertText //div[@id='UserDetailsView']/div/div/table/tbody/tr[2]/th Department
assertText //div[@id='UserDetailsView']/div/div/table/tbody/tr[2]/td
clickAndWait link=Edit
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click User_role_SelectLink
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Select a Role
click link=testRole${randomSuffix2}
waitForValue User_role_name testRole${randomSuffix2}
clickAndWait save
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertText //div[@id='UserDetailsView']/div/div[3]/table/tbody/tr[1]/td/a testRole${randomSuffix2}
open index.php/zurmo/role
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
clickAndWait link=testRole${randomSuffix}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click link=Delete Role
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertConfirmation Are you sure you want to delete this role?
chooseOkOnNextConfirmationAndWait
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertTextPresent Roles Home
assertTextNotPresent link=testRole${randomSuffix}
clickAndWait link=testRole${randomSuffix2}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertValue Role_role_name
click link=Delete Role
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertConfirmation Are you sure you want to delete this role?
chooseOkOnNextConfirmationAndWait
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertTextPresent Roles Home
assertTextNotPresent link=testRole${randomSuffix2}
open index.php/users/default
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
type UsersSearchForm_anyMixedAttributes Jhon Smith${randomSuffix}
keyUp UsersSearchForm_anyMixedAttributes \10
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Jhon Smith${randomSuffix}
assertText link=Jhon Smith${randomSuffix} Jhon Smith${randomSuffix}
clickAndWait link=Jhon Smith${randomSuffix}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertText //div[@id='UserDetailsView']/div/div/table/tbody/tr[2]/th Department
assertText //div[@id='UserDetailsView']/div/div/table/tbody/tr[2]/td