start moving from prototype to jquery

This commit is contained in:
John Bintz 2010-02-06 10:17:40 -05:00
parent 1da4c8e4e1
commit b1d6514e73
2 changed files with 95 additions and 0 deletions

View File

@ -111,6 +111,14 @@ var CategoryGroupings = {};
$('.category-group-holder input[type=checkbox], .category-group-holder label')
.unbind('click')
.click(CategoryGroupings.highlight_child_levels);
$('.delete-category-group-holder')
.unbind('click')
.click(function() {
if (confirm('Are you sure?')) {
$(this).parents('.category-group-holder').remove();
}
});
}(jQuery))
}

View File

@ -0,0 +1,87 @@
<?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>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>