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
type loginPassword Password
clickAndWait loginForm
assertTitle VIVO
comment Navigate to Jane Faculty
clickAndWait link=Index
assertTitle Index to VIVO Contents
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 Jane Faculty's image
clickAndWait //div[@id='dprop-vitro-image']/div/div/div/span/a[1]
comment Select to upload a new image but cancel out before cropping
assertTitle Replace image for Librarian, Lily
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyElementPresent //div[@id='photoUploadDefaultImageContainer']/img
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 //div[@id='dprop-vitro-image']/div/div/div/span/a[1]
comment Select to upload a new image but cancel out during cropping
assertTitle Replace image for Librarian, Lily
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyElementPresent //div[@id='photoUploadDefaultImageContainer']/img
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 //div[@id='dprop-vitro-image']/div/div/div/span/a[1]
comment Select to upload a new jpg image
assertTitle Replace image for Librarian, Lily
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyElementPresent //div[@id='photoUploadDefaultImageContainer']/img
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\lily2.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop Photo for Librarian, Lily
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
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 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 //div[@id='dprop-vitro-image']/div/div/div/span/a[1]
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 //div[@id='dprop-vitro-image']/div/div/div/span/a[1]
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