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 loginName testAdmin
type loginPassword Password
clickAndWait loginForm
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=Faculty, Jane
assertTitle Faculty, Jane
comment Select positions editing
clickAndWait //div[@id='personInPosition']/a
assertTitle Edit
verifyTextPresent Create position entry for Faculty, Jane
verifyTextPresent If your organization is not listed, please add a new organization.
comment Cancel without adding anything
clickAndWait link=Cancel
clickAndWait //div[@id='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
clickAndWait submit
verifyTextPresent This field must not be empty.
assertTitle Edit
comment Enter in all fields except for end year
type newOrgName Carroll College
select newOrgType label=College
select positionType label=Faculty Administrative Position
type title Lecturer
type startYear 1971
clickAndWait submit
comment Verify first position is listed properly
assertTitle Faculty, Jane
verifyTextPresent Carroll College Lecturer, 1971 -
comment Add second position using same organization
clickAndWait //div[@id='personInPosition']/a
assertTitle Edit
select organizationUri label=Carroll College
type title Assistant Professor
select positionType label=Faculty Position
type startYear 1981
type endYear 1985
clickAndWait submit
assertTitle Faculty, Jane
comment Verify both positions are listed properly
verifyTextPresent Carroll College Lecturer, 1971 -
verifyTextPresent Carroll College Assistant Professor, 1981 - 1985
comment Add third position using new organization
clickAndWait //div[@id='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
clickAndWait submit
assertTitle Faculty, Jane
comment Verify all three positions show up
verifyTextPresent Carroll College Lecturer, 1971 -
verifyTextPresent Cornell University Assistant Professor, 1986 - 2010
verifyTextPresent Carroll College Assistant Professor, 1981 - 1985
comment Log out
clickAndWait link=Home
clickAndWait link=Log out
assertTitle VIVO