comicpress-core/test/selenium/TestComicImageTypes.html

108 lines
2.4 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>TestComicImageTypes</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">TestComicImageTypes</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/wp-admin</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=ComicPress</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>comicpress-tab-Comic_Image_Types</td>
<td></td>
</tr>
<tr>
<td>assertVisible</td>
<td>comicpress-Comic_Image_Types</td>
<td></td>
</tr>
<tr>
<td>storeXpathCount</td>
<td>//div[@id=&quot;image-type-container&quot;]/div</td>
<td>current_count</td>
</tr>
<tr>
<td>click</td>
<td>add-new-image-type</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars['current_count']++</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@id=&quot;image-type-container&quot;]/div[${current_count}]</td>
<td></td>
</tr>
<tr>
<td>storeXpathCount</td>
<td>//div[@id=&quot;image-type-container&quot;]/div</td>
<td>new_count</td>
</tr>
<tr>
<td>assertEval</td>
<td>${current_count}</td>
<td>${new_count}</td>
</tr>
<tr>
<td>assertValue</td>
<td>//div[@id=&quot;image-type-container&quot;]/div[${new_count}]//input[contains(@name, &quot;[name]&quot;)]</td>
<td>New Type</td>
</tr>
<tr>
<td>click</td>
<td>//div[@id=&quot;image-type-container&quot;]/div[${new_count}]//a[@class=&quot;delete-image-type&quot;]</td>
<td></td>
</tr>
<tr>
<td>assertConfirmation</td>
<td>Are you sure?*</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@id=&quot;image-type-container&quot;]/div[${current_count}]</td>
<td></td>
</tr>
<tr>
<td>storeXpathCount</td>
<td>//div[@id=&quot;image-type-container&quot;]/div</td>
<td>new_count</td>
</tr>
<tr>
<td>assertEval</td>
<td>${current_count} - 1</td>
<td>${new_count}</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[@id='comicpress-image-types-holder']/input</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>ComicPress configuration updated.</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>