vivo/utilities/acceptance-tests/suites/CreatePeopleVB/UploadFacultyImage.html
2011-02-06 04:51:06 +00:00

479 lines
8.2 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>UploadFacultyImage</title>
<style type="text/css">
.testName {
color: blue;
background: rgb(80%, 80%, 80%);
font-family: sans-serif;
font-weight: bold;
font-size: larger;
text-align: center;
}
.comment {
color: blue;
background: rgb(80%, 80%, 80%);
font-family: sans-serif;
font-weight: bold;
font-size: larger;
text-align: center;
}
</style>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3" class="testName">UploadFacultyImage</td></tr>
</thead><tbody>
<tr>
<td>deleteAllVisibleCookies</td>
<td></td>
<td></td>
</tr>
<tr>
<td>setTimeout</td>
<td>100000</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Upload image for Jane Faculty in the backend</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>/vivo/</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>VIVO</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Must not be logged in</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Log in</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Log in to VIVO</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Must log in as site admin</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>loginName</td>
<td>testAdmin</td>
</tr>
<tr>
<td>type</td>
<td>loginPassword</td>
<td>Password</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>loginForm</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Find Jane Faculty via Index</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Index</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Faculty Member</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Faculty Member</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Faculty Member</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Verify no photo currently exists</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@title='no image']</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Select to update this individual in the backend</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Edit this individual</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Individual Control Panel</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Select to upload an image</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value='Upload Image']</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Upload image for Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Photo Upload</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Current Photo</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@alt='Individual photo']</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Cancel out before adding a photo</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Cancel</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Individual Control Panel</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Select a photo to add and then cancel out</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value='Upload Image']</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Upload image for Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Photo Upload</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Current Photo</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@alt='Individual photo']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>datafile</td>
<td>C:\vivo-code\vivo\utilities\acceptance-tests\suites\CreatePeople\Jane1.jpg</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Cancel</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Individual Control Panel</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Cancel after uploading the picture</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value='Upload Image']</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Upload image for Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Photo Upload</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Current Photo</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@alt='Individual photo']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>datafile</td>
<td>C:\VIVO\vivo\utilities\acceptance-tests\suites\CreatePeople\Jane1.jpg</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value='Upload photo']</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Crop Photo for Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Cancel</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Individual Control Panel</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Verify photo is not there</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Index</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Faculty Member</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Faculty Member</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@title='no image']</td>
<td></td>
</tr>
<tr>
<td>verifyElementNotPresent</td>
<td>//img[@title='click to view larger image']</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Now really add a photo</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Edit this individual</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Individual Control Panel</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value='Upload Image']</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Upload image for Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Photo Upload</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Current Photo</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@alt='Individual photo']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>datafile</td>
<td>C:\VIVO\\vivo\utilities\acceptance-tests\suites\CreatePeople\Jane1.jpg</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value='Upload photo']</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Crop Photo for Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Photo Upload</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Your profile photo will look like the image below.</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>To make adjustments, you can drag around and resize the photo to the right. When you are happy with your photo click the &quot;Save Photo&quot; button.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value='Save photo']</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Individual Control Panel</td>
<td></td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Verify photo is there</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Index</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Faculty Member</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Faculty Member</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>Faculty, Jane</td>
<td></td>
</tr>
<tr>
<td>verifyAttribute</td>
<td>//img[@title='click to view larger image']@src</td>
<td>/vivo/file/*/thumbnail_Jane1.jpg</td>
</tr>
<tr>
<td>comment</td>
<td class="comment">Logout</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Home</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Log out</td>
<td></td>
</tr>
<tr>
<td>assertTitle</td>
<td>VIVO</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>