AddPositions
comment Validate this form and add positions
deleteAllVisibleCookies
open /vivo/
assertTitle VIVO
comment Must not be logged in already
clickAndWait link=Log in
comment Must log in as site admin
type username testAdmin
type password Password
assertTitle VIVO Site Administration
clickAndWait loginSubmitMode
assertTitle VIVO Site Administration
comment Navigate to test faculty member via Index
clickAndWait link=Index
assertTitle Index to VIVO Contents
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=Jane Faculty
assertTitle Jane Faculty
comment Select positions editing
clickAndWait //div[@id='oprop-core-personInPosition']/a
assertTitle Edit
verifyTextPresent If your organization is not listed, please add a new organization.
comment Cancel without adding anything
click link=Cancel
pause 50000
clickAndWait //div[@id='oprop-core-personInPosition']/a
assertTitle Edit
comment Elect to add a new organization
click link=add a new organization
comment Add only organization name, which results in error
type newOrgName Carroll College
clickAndWait submit
assertTitle Edit
verifyTextPresent Must select a type for the new organization.
verifyTextPresent This field must not be empty.
comment Add only organization name and type, which results in error
type newOrgName Carroll College
select newOrgType label=College
clickAndWait submit
assertTitle Edit
verifyTextPresent This field must not be empty.
comment Add position title, but leave position type and start year blank
type newOrgName Carroll College
select newOrgType label=College
type title Lecturer
click submit
pause 50000
verifyTextPresent This field must not be empty.
assertTitle Edit
comment Enter all required fields except start year
type newOrgName Carroll College
select newOrgType label=College
select positionType label=Faculty Administrative Position
type title Lecturer
clickAndWait submit
assertTitle Edit
verifyTextPresent This field must not be empty.
comment Enter in all fields, with invalid start year
type startYear 9999
click submit
pause 50000
comment Verify first position is listed properly
assertTitle Jane Faculty
verifyTextPresent Carroll College Lecturer, 9999 -
comment Add second position using same organization
clickAndWait //div[@id='oprop-core-personInPosition']/a
assertTitle Edit
select organizationUri label=Carroll College
type title Assistant Professor
select positionType label=Faculty Position
type startYear 1981
type endYear 1985
click submit
pause 50000
assertTitle Jane Faculty
comment Verify both positions are listed properly
verifyTextPresent Carroll College Lecturer, 9999 -
verifyTextPresent Carroll College Assistant Professor, 1981 - 1985
comment Add third position using new organization
clickAndWait //div[@id='oprop-core-personInPosition']/a
assertTitle Edit
click link=add a new organization
type newOrgName Cornell University
select newOrgType label=University
type title Assistant Professor
select positionType label=Faculty Position
type startYear 1986
type endYear 2010
click submit
pause 50000
assertTitle Jane Faculty
comment Verify all three positions show up
verifyTextPresent Carroll College Lecturer, 9999 -
verifyTextPresent Cornell University Assistant Professor, 1986 - 2010
verifyTextPresent Carroll College Assistant Professor, 1981 - 1985
comment Log out
clickAndWait link=Log out
assertTitle VIVO