ChangeLibrarianImage
deleteAllVisibleCookies
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 VIVO Site Administration
comment Must log in as 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=Librarian
assertTitle Librarian
clickAndWait link=Lily Librarian
assertTitle Lily Librarian
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
assertTitle Replace image for Lily Librarian
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyElementPresent //div[@id='photoUploadDefaultImageContainer']/img
type datafile C:\vivo-code\vivo\utilities\acceptance-tests\suites\CreatePeople\Lily2.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop Photo for Lily Librarian
clickAndWait link=Cancel
assertTitle Lily Librarian
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
assertTitle Replace image for Lily Librarian
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyElementPresent //div[@id='photoUploadDefaultImageContainer']/img
type datafile C:\vivo-code\vivo\utilities\acceptance-tests\suites\CreatePeople\Lily2.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop Photo for Lily Librarian
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
assertTitle Replace image for Jane Faculty
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyElementPresent //div[@id='photoUploadDefaultImageContainer']/img
type datafile C:\vivo-code\vivo\utilities\acceptance-tests\suites\CreatePeople\Lily2.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop Photo for Lily Librarian
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 Lily Librarian
comment Verify image has been updated to new one
verifyAttribute //img[@title='click to view larger image']@src /vivo/file/*/thumbnail_Lily2.jpg
comment Logout
clickAndWait link=Log out
assertTitle VIVO