AddFacultyMemberRoles1
comment Add grant roles for Jane Faculty--originally tested auto-complete but doesn't work well within Selenium
deleteAllVisibleCookies
open /vivo/
assertTitle VIVO
comment Must be logged off to start
clickAndWait link=Log in
assertTitle Log in to VIVO
comment Must login as the site admin
type loginName testAdmin
type loginPassword Password
clickAndWait loginForm
assertTitle VIVO Site Administration
comment Navigate to Jane Faculty
clickAndWait link=Index
assertTitle Index to VIVO Contents
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=Faculty, Jane
assertTitle Faculty, Jane
comment Cancel out before adding Co-principal Investigator
clickAndWait //h3[@id='hasCo-PrincipalInvestigatorRole']/a/img
assertTitle Edit
verifyTextPresent Create co-principal investigator entry for Faculty, Jane
verifyTextPresent Grant Name
verifyTextPresent Years of Participation in Grant
verifyTextPresent Start Year
verifyTextPresent End Year
clickAndWait link=Cancel
assertTitle Faculty, Jane
comment Add good Co-principal Investigator role
clickAndWait //h3[@id='hasCo-PrincipalInvestigatorRole']/a/img
verifyTextPresent Create co-principal investigator entry for Faculty, Jane
verifyTextPresent Grant Name
verifyTextPresent Years of Participation in Grant
verifyTextPresent Start Year
verifyTextPresent End Year
type relatedIndLabel NIH VIVO
type startField.year 2009
type endField.year 2010
clickAndWait submit
assertTitle Faculty, Jane
comment Navigate back to Jane Faculty
clickAndWait link=Index
assertTitle Index to VIVO Contents
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=Faculty, Jane
assertTitle Faculty, Jane
comment Verify Co-principal Investigator role is showing up
verifyElementPresent link=NIH VIVO
verifyTextPresent NIH VIVO 2009 - 2010
comment Add second Co-principal Investigator role
clickAndWait //h3[@id='hasCo-PrincipalInvestigatorRole']/a/img
assertTitle Edit
verifyTextPresent Create co-principal investigator entry for Faculty, Jane
verifyTextPresent Grant Name
verifyTextPresent Years of Participation in Grant
verifyTextPresent Start Year
verifyTextPresent End Year
type relatedIndLabel VIVO Cornell Grant
type startField.year 2007
type endField.year 2009
clickAndWait submit
assertTitle Faculty, Jane
comment Navigate back to Jane Faculty
clickAndWait link=Index
assertTitle Index to VIVO Contents
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=Faculty, Jane
assertTitle Faculty, Jane
comment Verify both Co-principal Investigator roles are showing up
verifyElementPresent link=VIVO Cornell Grant
verifyTextPresent VIVO Cornell Grant 2007 - 2009
verifyElementPresent link=NIH VIVO
verifyTextPresent NIH VIVO 2009 - 2010
comment Cancel out before adding Investigator
clickAndWait //h3[@id='hasInvestigatorRole']/a/img
assertTitle Edit
verifyTextPresent Create investigator entry for Faculty, Jane
verifyTextPresent Grant Name
verifyTextPresent Years of Participation in Grant
verifyTextPresent Start Year
verifyTextPresent End Year
clickAndWait link=Cancel
assertTitle Faculty, Jane
comment Enter good Investigator role
clickAndWait //h3[@id='hasInvestigatorRole']/a/img
assertTitle Edit
verifyTextPresent Create investigator entry for Faculty, Jane
verifyTextPresent Grant Name
verifyTextPresent Years of Participation in Grant
verifyTextPresent Start Year
verifyTextPresent End Year
type relatedIndLabel VIVO Cornell Grant Too
type startField.year 2009
type endField.year 2009
clickAndWait submit
assertTitle Faculty, Jane
comment Navigate back to Jane Faculty
clickAndWait link=Index
assertTitle Index to VIVO Contents
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=Faculty, Jane
assertTitle Faculty, Jane
comment Verify Investigator role is showing up
verifyElementPresent link=VIVO Cornell Grant Too
verifyTextPresent VIVO Cornell Grant Too 2009
comment Add Principal Investigator role
clickAndWait //h3[@id='hasPrincipalInvestigatorRole']/a/img
assertTitle Edit
verifyTextPresent Create principal investigator entry for Faculty, Jane
verifyTextPresent Grant Name
verifyTextPresent Years of Participation in Grant
verifyTextPresent Start Year
verifyTextPresent End Year
type relatedIndLabel NIH VIVO Too
type startField.year 2010
type endField.year
clickAndWait submit
assertTitle Faculty, Jane
comment Navigate back to Jane Faculty
clickAndWait link=Index
assertTitle Index to VIVO Contents
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=Faculty, Jane
assertTitle Faculty, Jane
comment Verify Principal Investigator role is showing up
verifyElementPresent link=NIH VIVO Too
verifyTextPresent NIH VIVO Too 2010 -
comment Verify that all grant roles are still there
verifyElementPresent link=NIH VIVO
verifyTextPresent NIH VIVO 2009 - 2010
verifyElementPresent link=VIVO Cornell Grant
verifyTextPresent VIVO Cornell Grant 2007 - 2009
verifyElementPresent link=VIVO Cornell Grant Too
verifyTextPresent VIVO Cornell Grant Too 2009
verifyElementPresent link=NIH VIVO Too
verifyTextPresent NIH VIVO Too 2010 -
comment Log out
clickAndWait link=Home
clickAndWait link=Log out
assertTitle VIVO