aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/accordion/accordion.html
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2010-04-03 17:08:45 +0200
committerjzaefferer <joern.zaefferer@gmail.com>2010-04-03 17:08:45 +0200
commitad5bfc7f604bf298ecfeac77db50081fc33dbfd0 (patch)
tree98510a0c627a70d2b30eec21ff923ff064bd15c9 /tests/unit/accordion/accordion.html
parent87ba795467ee447eb2ab7d95ada42de097c7946f (diff)
downloadjquery-ui-ad5bfc7f604bf298ecfeac77db50081fc33dbfd0.tar.gz
jquery-ui-ad5bfc7f604bf298ecfeac77db50081fc33dbfd0.zip
Accordion unit tests: Refactored state-helper function
Diffstat (limited to 'tests/unit/accordion/accordion.html')
-rw-r--r--tests/unit/accordion/accordion.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/accordion/accordion.html b/tests/unit/accordion/accordion.html
index df0979803..9b6cb63f2 100644
--- a/tests/unit/accordion/accordion.html
+++ b/tests/unit/accordion/accordion.html
@@ -16,6 +16,18 @@
<script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../testsuite.js"></script>
+ <script type="text/javascript">
+ $.ui.accordion.prototype.options.animated = false;
+
+ function state(accordion) {
+ var args = $.makeArray(arguments).slice(1);
+ var result = [];
+ $.each(args, function(i, n) {
+ result.push( accordion.find(".ui-accordion-content").eq(i).is(":visible") ? 1 : 0 );
+ });
+ same(args, result)
+ }
+ </script>
<script type="text/javascript" src="accordion_core.js"></script>
<script type="text/javascript" src="accordion_defaults.js"></script>
<script type="text/javascript" src="accordion_events.js"></script>