ChangeLibrarianImage
deleteAllVisibleCookies
setTimeout 100000
comment Change the uploaded picture for Lily Librarian in the frontend
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 Navigate to Lily Librarian
clickAndWait link=Index
clickAndWait link=Librarian
assertTitle Librarian
clickAndWait link=Librarian, Lily
assertTitle Librarian, Lily
verifyAttribute //img[@title='click to view larger image']@src /vivo/file/*/thumbnail_lily1.jpg
comment Select to edit Lily Librarian's image
clickAndWait css=img.edit-individual
comment Select to upload a new image but cancel out before cropping
assertTitle Replace image for Librarian, Lily
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyTextPresent Replace Photo (JPEG, GIF or PNG)
verifyElementPresent //img[@alt='Individual photo']
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\lily2.jpg
clickAndWait link=Cancel
assertTitle Librarian, Lily
comment Select to edit Lily Librarian's image again
clickAndWait //img[@alt='edit']
comment Select to upload a new image but cancel out during cropping
assertTitle Replace image for Librarian, Lily
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyTextPresent Replace Photo (JPEG, GIF or PNG)
verifyElementPresent //img[@alt='Individual photo']
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\lily2.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop Photo for Librarian, Lily
clickAndWait link=Cancel
assertTitle Librarian, Lily
comment Select to edit Lily Librarian's image
clickAndWait //img[@alt='edit']
comment Select to upload a new jpg image
assertTitle Replace image for Librarian, Lily
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyTextPresent Replace Photo (JPEG, GIF or PNG)
verifyElementPresent //img[@alt='Individual photo']
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\lily2.jpg
clickAndWait css=input.submit
assertTitle Crop Photo for Librarian, Lily
clickAndWait css=input.submit
assertTitle Librarian, Lily
comment Verify image has been updated to new one
verifyAttribute //img[@title='click to view larger image']@src /vivo/file/*/thumbnail_lily2.jpg
comment Select to edit Lily Librarian's image again
clickAndWait //img[@alt='edit']
comment Select to upload a new png image
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\lily3.png
clickAndWait //input[@value='Upload photo']
assertTitle Crop Photo for Librarian, Lily
clickAndWait //input[@value='Save photo']
assertTitle Librarian, Lily
comment Verify image has been updated to new one
verifyAttribute //img[@title='click to view larger image']@src /vivo/file/*/thumbnail_lily3.jpg
comment Select to edit Lily Librarian's image again
clickAndWait //img[@alt='edit']
comment Select to upload a new gif image
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\lily4.gif
clickAndWait //input[@value='Upload photo']
assertTitle Crop Photo for Librarian, Lily
clickAndWait //input[@value='Save photo']
assertTitle Librarian, Lily
comment Verify image has been updated to new one
verifyAttribute //img[@title='click to view larger image']@src /vivo/file/*/thumbnail_lily4.jpg
comment Logout
clickAndWait link=Home
clickAndWait link=Log out
assertTitle VIVO