AddEducationBackground
comment Validate Educational Background Form
deleteAllVisibleCookies
setTimeout 100000
open /vivo/
assertTitle VIVO
comment Must not be logged in already
clickAndWait link=Log in
assertTitle VIVO Site Administration
comment Must log in as site admin
type username testAdmin
type password Password
clickAndWait loginSubmitMode
assertTitle VIVO Site Administration
comment Navigate to Jane Faculty via Index
clickAndWait link=Index
assertTitle Index to VIVO Contents
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=Jane Faculty
pause 5000
assertTitle Jane Faculty
clickAndWait //div[@id='oprop-core-educationalBackground']/a
assertTitle Edit
comment Cancel out of form
clickAndWait link=Cancel
assertTitle Jane Faculty
clickAndWait //div[@id='oprop-core-educationalBackground']/a
comment Verify entering no fields results in error
clickAndWait submit
assertTitle Edit
verifyTextPresent This field must not be empty.
verifyTextPresent Must either choose an existing organization or create a new one.
comment Verify entering just degree is not valid
select degreeUri label=B.S. Bachelor of Science
clickAndWait submit
assertTitle Edit
verifyTextPresent This field must not be empty.
verifyTextPresent Must either choose an existing organization or create a new one.
comment Verify entering just degree and major is not valid
select degreeUri label=B.S. Bachelor of Science
type majorField Business Administration
clickAndWait submit
assertTitle Edit
verifyTextPresent This field must not be empty.
verifyTextPresent Must either choose an existing organization or create a new one.
comment Verify organization must be selected or entered
select degreeUri label=B.S. Bachelor of Science
type majorField Business Administration
comment For now 9999 is a valid year
type year 9999
clickAndWait submit
assertTitle Edit
verifyTextPresent Must either choose an existing organization or create a new one.
comment Select to add new organization but cancel before doing so
click link=add a new organization
click link=cancel
comment Select to add new organization but leave field blank
click link=add a new organization
clickAndWait submit
assertTitle Edit
verifyTextPresent Must either choose an existing organization or create a new one.
click link=add a new organization
comment Enter in new organization name but leave type blank
type newOrgName Corny College
clickAndWait submit
assertTitle Edit
verifyTextPresent Must select a type for the new organization.
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
comment Enter everything in correctly
select newOrgType label=College
clickAndWait submit
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
assertTitle Jane Faculty
comment Verify degree appears
verifyTextPresent B.S. in Business Administration, Corny College, 9999
clickAndWait //div[@id='oprop-core-educationalBackground']/a
assertTitle Edit
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
comment Add degree from existing organization
select degreeUri label=M.B.A. Master of Business Administration
type majorField Business Administration
type year 2000
select organizationUri label=Corny College
type dept Business Department
click submit
pause 50000
assertTitle Jane Faculty
comment Verify both degrees appear
verifyTextPresent B.S. in Business Administration, Corny College, 9999
verifyTextPresent M.B.A. in Business Administration, Corny College, Business Department, 2000
comment Add third degree from new organization
clickAndWait //div[@id='oprop-core-educationalBackground']/a
assertTitle Edit
select degreeUri label=M.Ed. Master of Education
type majorField Business Education
type year 2005
click link=add a new organization
type newOrgName University of Wisconsin
select newOrgType label=University
type info Graduate School Fellowship
clickAndWait submit
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
refreshAndWait 10000
assertTitle Jane Faculty
comment Verify all 3 degress show up
verifyTextPresent M.Ed. in Business Education, University of Wisconsin, 2005, Graduate School Fellowship
verifyTextPresent M.B.A. in Business Administration, Corny College, Business Department, 2000
verifyTextPresent B.S. in Business Administration, Corny College, 9999
comment Log out
click link=Log out
pause 5000
assertTitle VIVO