UploadFacultyImage
deleteAllVisibleCookies
setTimeout 100000
comment Upload image for Jane Faculty in the backend
open /vivo/
assertTitle VIVO
comment Must not be logged in
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 Find Jane Faculty via Index
clickAndWait link=Index
verifyTextPresent Faculty Member
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=Faculty, Jane
assertTitle Faculty, Jane
comment Verify no photo currently exists
verifyElementPresent //img[@title='no image']
comment Select to upload an image
clickAndWait css=img.add-individual
assertTitle Upload image for Faculty, Jane
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyTextPresent Upload a photo (JPEG, GIF or PNG)
verifyElementPresent //img[@alt='Individual photo']
comment Cancel out before adding a photo
clickAndWait link=Cancel
assertTitle Faculty, Jane
comment Select a photo to add and then cancel out
clickAndWait css=img.add-individual
assertTitle Upload image for Faculty, Jane
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyTextPresent Upload a photo (JPEG, GIF or PNG)
verifyElementPresent //img[@alt='Individual photo']
type datafile C:\vivo-code\vivo\utilities\acceptance-tests\suites\CreatePeople\Jane1.jpg
clickAndWait link=Cancel
assertTitle Faculty, Jane
comment Cancel after uploading the picture
clickAndWait css=img.add-individual
assertTitle Upload image for Faculty, Jane
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyTextPresent Upload a photo (JPEG, GIF or PNG)
verifyElementPresent //img[@alt='Individual photo']
type datafile /Users/jc55/tomcat/webapps/vivo/utilities/acceptance-tests/suites/CreatePeople/Jane1.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Upload image for Faculty, Jane
verifyTextPresent Photo Upload
clickAndWait link=Cancel
assertTitle Faculty, Jane
comment Verify photo is not there
clickAndWait link=Index
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=Faculty, Jane
assertTitle Faculty, Jane
verifyElementPresent //img[@title='no image']
verifyElementNotPresent //img[@title='click to view larger image']
comment Now really add a photo
clickAndWait css=img.add-individual
assertTitle Upload image for Faculty, Jane
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyTextPresent Upload a photo (JPEG, GIF or PNG)
verifyElementPresent //img[@alt='Individual photo']
type datafile C:\VIVO\\vivo\utilities\acceptance-tests\suites\CreatePeople\Jane1.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop Photo for Faculty, Jane
verifyTextPresent Photo Upload
verifyTextPresent Your profile photo will look like the image below.
verifyTextPresent To make adjustments, you can drag around and resize the photo to the right. When you are happy with your photo click the "Save Photo" button.
clickAndWait //input[@value='Save photo']
assertTitle Faculty, Jane
comment Verify photo is there
clickAndWait link=Index
clickAndWait link=Faculty Member
assertTitle Faculty Member
clickAndWait link=Faculty, Jane
assertTitle Faculty, Jane
verifyAttribute //img[@title='click to view larger image']@src /vivo/file/*/thumbnail_Jane1.jpg
comment Logout
clickAndWait link=Home
clickAndWait link=Log out
assertTitle VIVO