CheckUserBasedPrivileges
deleteAllVisibleCookies
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
clickAndWait link=Log in
assertTitle VIVO
type loginName testAdmin
type password Password
clickAndWait loginForm
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:Faculty Member
clickAndWait primaryAction
assertTitle Individual Control Panel
comment comment pause for class inference
pause 1500
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
pause 5000
clickAndWait link=Select a person
assertTitle Edit
select objectVar label=UserJoe
clickAndWait submit
assertTitle User Account Control Panel
verifyTextPresent Change or Remove Association
verifyTextPresent 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
comment Joe is unprivileged, so he goes directly to his home page.
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=Change or Remove Association
assertTitle Edit
clickAndWait delete
assertTitle User Account Control Panel
assertTextPresent This user account is not associated with a person
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=Home
clickAndWait link=Log out
assertTitle VIVO