comicpress-core/test/selenium/TestCategoryGroupings.html

93 lines
2.1 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="http://comicpress-mu.local/" />
<title>TestCategoryGroupings</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">TestCategoryGroupings</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-Category_Groups</td>
<td></td>
</tr>
<tr>
<td>storeXpathCount</td>
<td>//div[@id=&quot;category-groups-holder&quot;]/div</td>
<td>current_count</td>
</tr>
<tr>
<td>click</td>
<td>add-new-category-group</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars['current_count']++</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@id=&quot;category-groups-holder&quot;]/div[${current_count}]</td>
<td></td>
</tr>
<tr>
<td>storeXpathCount</td>
<td>//div[@id=&quot;category-groups-holder&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;category-groups-holder&quot;]/div[${new_count}]//input[contains(@name, &quot;[name]&quot;)]</td>
<td>group</td>
</tr>
<tr>
<td>click</td>
<td>//div[@id=&quot;category-groups-holder&quot;]/div[${new_count}]//a[@class=&quot;delete-category-group-holder&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;category-groups-holder&quot;]/div[${current_count}]</td>
<td></td>
</tr>
<tr>
<td>storeXpathCount</td>
<td>//div[@id=&quot;category-groups-holder&quot;]/div</td>
<td>new_count</td>
</tr>
<tr>
<td>assertEval</td>
<td>${current_count} - 1</td>
<td>${new_count}</td>
</tr>
</tbody></table>
</body>
</html>