ChangeFacultyImage
deleteAllVisibleCookies
setTimeout 100000
comment Change the uploaded picture 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
type loginPassword Password
clickAndWait loginForm
assertTitle VIVO
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
verifyAttribute //img[@title='click to view larger image']@src /vivo/file/*/thumbnail_Jane1.jpg
comment Select to edit Jane Faculty's profile
clickAndWait link=edit this individual
assertTitle Individual Control Panel
verifyTextPresent Faculty, Jane
comment Select to upload a new image but cancel out
clickAndWait //input[@value='Upload Image']
assertTitle Replace image for Faculty, Jane
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyElementPresent //div[@id='photoUploadDefaultImageContainer']/img
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\Jane2.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop Photo for Faculty, Jane
clickAndWait link=Cancel
assertTitle Individual Control Panel
verifyTextPresent Faculty, Jane
comment Select file to upload again
clickAndWait //input[@value='Upload Image']
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyElementPresent //div[@id='photoUploadDefaultImageContainer']/img
assertTitle Replace image for Faculty, Jane
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\Jane2.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop Photo for Faculty, Jane
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 Individual Control Panel
comment Verify image has been updated to new one
clickAndWait link=Index
assertTitle Index to VIVO Contents
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_Jane2.jpg
comment Logout
clickAndWait link=Home
clickAndWait link=Log out
assertTitle VIVO