AddPositions
comment Validate this form and add advises
deleteAllVisibleCookies
setTimeout 100000
open /vivo/
assertTitle VIVO
comment Must not be logged in already
clickAndWait link=Log in
assertTitle Log in to VIVO
comment Must log in as site admin
type loginName testAdmin@cornell.edu
type loginPassword Password
clickAndWait loginForm
comment Navigate to test faculty member via Index
clickAndWait link=Index
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=Faculty, Jane
assertTitle Faculty, Jane
comment Select advises editing
clickAndWait css=a.add-advisorIn > img.add-individual
assertTitle Edit
verifyTextPresent Create advising relationship entry for Faculty, Jane
verifyTextPresent Advising Relationship Type
verifyTextPresent Advisee: Last Name
verifyTextPresent First Name
verifyTextPresent Subject Area
verifyTextPresent Degree Candidacy
verifyTextPresent Years of Participation
verifyTextPresent Start
Year
verifyTextPresent End
Year
comment Cancel without adding anything
clickAndWait link=Cancel
clickAndWait css=a.add-advisorIn > img.add-individual
assertTitle Edit
comment Add only type, which results in error
select id=selector label=Undergraduate Advising Relationship
clickAndWait css=input.submit
assertTitle Edit
verifyTextPresent You must enter a value in the Last Name field.
verifyTextPresent You must enter a value in the First Name field.
comment Add only type and last name, which results in error
select id=selector label=Undergraduate Advising Relationship
type id=advisee Smith
clickAndWait css=input.submit
assertTitle Edit
verifyTextPresent You must enter a value in the First Name field.
comment Add only type and first name, which results in error
select id=selector label=Undergraduate Advising Relationship
type id=advisee
type id=firstName Joe
clickAndWait css=input.submit
verifyTextPresent You must enter a value in the Last Name field.
comment Add only type. last name, and first name, which should be accepted
select id=selector label=Undergraduate Advising Relationship
type id=advisee Smith
type id=firstName Joe
clickAndWait css=input.submit
comment Verify display of first advises
verifyTextPresent undergraduate advising relationship
verifyElementPresent link=Smith, Joe
comment Add a second advises, including all fields
clickAndWait css=a.add-advisorIn > img.add-individual
assertTitle Edit
select id=selector label=Graduate Advising Relationship
type id=advisee Doe
type id=firstName John
type id=SubjectArea Primates
select id=degreeUri label=M.S. Master of Science
type id=startField-year 2008
type id=endField-year 2011
clickAndWait css=input.submit
assertTitle Faculty, Jane
comment Verify display of first and second advises
verifyTextPresent undergraduate advising relationship
verifyElementPresent link=Smith, Joe
verifyTextPresent graduate advising relationship
verifyTextPresent Doe, John, M.S.  candidate, 2008 - 2011
verifyElementPresent link=Doe, John
comment Add a third advises, exluding degree and end date
clickAndWait css=a.add-advisorIn > img.add-individual
assertTitle Edit
select id=selector label=Faculty Mentoring Relationship
type id=advisee Adams
type id=firstName Jeff
type id=SubjectArea Primate Health
type id=startField-year 2012
clickAndWait css=input.submit
assertTitle Faculty, Jane
comment Verify all 3 advises together
verifyTextPresent undergraduate advising relationship
verifyElementPresent link=Smith, Joe
verifyTextPresent graduate advising relationship
verifyTextPresent Doe, John, M.S.  candidate, 2008 - 2011
verifyElementPresent link=Doe, John
verifyTextPresent faculty mentoring relationship
verifyTextPresent Adams, Jeff, 2012 -
verifyElementPresent link=Adams, Jeff
comment Log out
clickAndWait link=Home
clickAndWait link=Log out
assertTitle VIVO