Check User Privileges
comment This tests if a User can be associated with an Individual and if the User can then do profile editing.
open /vivo/siteAdmin?home=1&login=block
assertTitle VIVO Site Administration
clickAndWait link=Log in
assertTitle VIVO Site Administration
type username testAdmin
type password Password
clickAndWait loginSubmitMode
assertTitle VIVO Site Administration
clickAndWait link=Class hierarchy
comment add a person to associate Joe User with.
assertTitle Class Hierarchy
clickAndWait link=exact:foaf:Agent
assertTitle Class Control Panel
clickAndWait //input[@value='Add New Individual in This Class']
assertTitle Individual Editing Form
type Name UserJoe
clickAndWait primaryAction
assertTitle Individual Control Panel
clickAndWait //input[@value='Add Type']
assertTitle Individual Type Editing Form
select TypeURI label=core:FacultyMember
clickAndWait primaryAction
assertTitle Individual Control Panel
comment comment pause for class inference
pause 500
clickAndWait link=Site Admin
assertTitle VIVO Site Administration
comment Associate Joe User and individual UserJoe.
clickAndWait link=User accounts
assertTitle User Accounts
clickAndWait link=Joe User
assertTitle User Account Control Panel
clickAndWait link=add
assertTitle Edit
select objectVar label=UserJoe
clickAndWait submit
assertTitle User Account Control Panel
verifyTextPresent delete
verifyTextPresent exact:http://vivo.mydomain.edu/individual/UserJoe
clickAndWait link=Log out
assertTitle VIVO
comment Log in as Joe User.
clickAndWait link=Log in
assertTitle VIVO Site Administration
type username Joe User
type password firstTime
clickAndWait loginSubmitMode
assertTitle UserJoe
clickAndWait link=Index
assertTitle Index to VIVO Contents
clickAndWait link=FacultyMember
assertTitle FacultyMember
clickAndWait link=UserJoe
assertTitle UserJoe
comment Check if there are edit links.
verifyElementPresent link=add
clickAndWait link=Index
assertTitle Index to VIVO Contents
comment Check that Joe User cannot edit other individuals.
clickAndWait link=Country
assertTitle Country
clickAndWait link=Afghanistan
assertTitle Afghanistan
assertTextNotPresent add
clickAndWait link=Log out
assertTitle VIVO
comment Clean up.
clickAndWait link=Log in
assertTitle VIVO Site Administration
type username testAdmin
type password Password
clickAndWait loginSubmitMode
assertTitle VIVO Site Administration
clickAndWait link=User accounts
assertTitle User Accounts
clickAndWait link=Joe User
assertTitle User Account Control Panel
clickAndWait link=delete
assertTitle Edit
clickAndWait delete
assertTitle User Account Control Panel
clickAndWait link=Index
assertTitle Index to VIVO Contents
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=UserJoe
assertTitle UserJoe
clickAndWait link=edit this individual
assertTitle Individual Control Panel
clickAndWait //input[@value='Edit This Individual']
assertTitle Individual Editing Form
clickAndWait _delete
assertConfirmation Are you SURE you want to delete this entity? If in doubt, CANCEL.
assertTitle VIVO Site Administration
clickAndWait link=Index
assertTitle Index to VIVO Contents
clickAndWait link=Log out
assertTitle VIVO