UploadNonPersonImage
deleteAllVisibleCookies
setTimeout 200000
open /vivo/
assertTitle VIVO
clickAndWait link=Log in
assertTitle Log in to VIVO
type loginName testAdmin@cornell.edu
type loginPassword Password
clickAndWait loginForm
clickAndWait link=Index
clickAndWait link=Country
assertTitle Country
clickAndWait link=3
assertTitle Country
clickAndWait link=Germany
assertTitle Germany
verifyTextPresent Photo
verifyTextNotPresent //img[@title='click to view larger image']
clickAndWait //img[@alt='add']
assertTitle Upload image for Germany
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyTextPresent Upload a photo (JPEG, GIF or PNG)
clickAndWait link=Cancel
assertTitle Germany
clickAndWait //img[@alt='add']
assertTitle Upload image for Germany
clickAndWait //input[@value='Upload photo']
assertTitle Upload image for Germany
verifyTextPresent Please browse and select a photo.
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\germany1.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop image for Germany
clickAndWait link=Cancel
assertTitle Germany
clickAndWait //img[@alt='add']
assertTitle Upload image for Germany
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\germany1.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop image for Germany
clickAndWait //input[@value='Save photo']
assertTitle Germany
verifyElementPresent //img[@title='click to view larger image']
verifyAttribute //img[@title='click to view larger image']@src /vivo/file/*/thumbnail_germany1.jpg
assertTitle Germany
clickAndWait css=img.edit-individual
assertTitle Replace image for Germany
verifyTextPresent Photo Upload
verifyTextPresent Current Photo
verifyElementPresent //img[@alt='Individual photo']
verifyTextPresent Replace Photo (JPEG, GIF or PNG)
clickAndWait link=Cancel
assertTitle Germany
verifyElementPresent //img[@title='click to view larger image']
verifyAttribute //img[@title='click to view larger image']@src /vivo/file/*/thumbnail_germany1.jpg
clickAndWait css=img.edit-individual
assertTitle Replace image for Germany
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\germany2.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop image for Germany
clickAndWait link=Cancel
assertTitle Germany
verifyElementPresent //img[@title='click to view larger image']
verifyAttribute //img[@title='click to view larger image']@src /vivo/file/*/thumbnail_germany1.jpg
clickAndWait css=img.edit-individual
assertTitle Replace image for Germany
type datafile C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\germany2.jpg
clickAndWait //input[@value='Upload photo']
assertTitle Crop image for Germany
clickAndWait //input[@value='Save photo']
assertTitle Germany
verifyElementPresent //img[@title='click to view larger image']
verifyAttribute //img[@title='click to view larger image']@src /vivo/file/*/thumbnail_germany2.jpg
clickAndWait css=img.delete-individual
assertConfirmation Are you sure you want to delete this photo?
waitForPageToLoad 5000
assertTitle Germany
verifyElementNotPresent //img[@title='click to view larger image']
clickAndWait link=Home
clickAndWait link=Log out
assertTitle VIVO