From b1d6514e732451edffd0ef7140f4a891766ab3c9 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sat, 6 Feb 2010 10:17:40 -0500 Subject: [PATCH] start moving from prototype to jquery --- js/Storyline.js | 8 +++ test/selenium/TestCategoryGroupings.html | 87 ++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 test/selenium/TestCategoryGroupings.html diff --git a/js/Storyline.js b/js/Storyline.js index 3bc3252..5fb4563 100644 --- a/js/Storyline.js +++ b/js/Storyline.js @@ -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)) } diff --git a/test/selenium/TestCategoryGroupings.html b/test/selenium/TestCategoryGroupings.html new file mode 100644 index 0000000..ffb2ad7 --- /dev/null +++ b/test/selenium/TestCategoryGroupings.html @@ -0,0 +1,87 @@ + + + + + + +TestCategoryGroupings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TestCategoryGroupings
open/wp-admin
clickAndWaitlink=ComicPress
clickcomicpress-tab-Category_Groups
storeXpathCount//div[@id="category-groups-holder"]/divcurrent_count
clickadd-new-category-group
storeEvalstoredVars['current_count']++
waitForElementPresent//div[@id="category-groups-holder"]/div[${current_count}]
storeXpathCount//div[@id="category-groups-holder"]/divnew_count
assertEval${current_count}${new_count}
assertValue//div[@id="category-groups-holder"]/div[${new_count}]//input[contains(@name, "[name]")]group
click//div[@id="category-groups-holder"]/div[${new_count}]//a[@class="delete-category-group-holder"]
assertConfirmationAre you sure?
storeXpathCount//div[@id="category-groups-holder"]/divnew_count
assertEval${current_count} - 1${new_count}
+ +