[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/libraries/jquery.ui/tests/unit/accordion/ -> accordion_methods.js (source)

   1  /*

   2   * accordion_methods.js

   3   */
   4  (function($) {
   5  
   6  module("accordion: methods");
   7  
   8  test("init", function() {
   9      ok(false, 'missing test - untested code is broken code');
  10  });
  11  
  12  test("destroy", function() {
  13      ok(false, 'missing test - untested code is broken code');
  14  });
  15  
  16  test("enable", function() {
  17      ok(false, 'missing test - untested code is broken code');
  18  });
  19  
  20  test("disable", function() {
  21      ok(false, 'missing test - untested code is broken code');
  22  });
  23  
  24  test("activate, numeric", function() {
  25      var ac = $('#list1').accordion({ active: 1 });
  26      state(ac, 0, 1, 0);
  27      ac.accordion("activate", 2);
  28      state(ac, 0, 0, 1);
  29      ac.accordion("activate", 0);
  30      state(ac, 1, 0, 0);
  31      ac.accordion("activate", 1);
  32      state(ac, 0, 1, 0);
  33      ac.accordion("activate", 2);
  34      state(ac, 0, 0, 1);
  35      ac.accordion("activate", -1);
  36      state(ac, 0, 0, 1);
  37  });
  38  
  39  test("activate, boolean and numeric, collapsible:true", function() {
  40      var ac = $('#list1').accordion({collapsible: true}).accordion("activate", 2);
  41      state(ac, 0, 0, 1);
  42      ok("x", "----");
  43      ac.accordion("activate", 0);
  44      state(ac, 1, 0, 0);
  45      ok("x", "----");
  46      ac.accordion("activate", -1);
  47      state(ac, 0, 0, 0);
  48  });
  49  
  50  test("activate, boolean, collapsible:false", function() {
  51      var ac = $('#list1').accordion().accordion("activate", 2);
  52      state(ac, 0, 0, 1);
  53      ac.accordion("activate", -1);
  54      state(ac, 0, 0, 1);
  55  });
  56  
  57  test("activate, string expression", function() {
  58      var ac = $('#list1').accordion({ active: "a:last" });
  59      state(ac, 0, 0, 1);
  60      ac.accordion("activate", ":first");
  61      state(ac, 1, 0, 0);
  62      ac.accordion("activate", ":eq(1)");
  63      state(ac, 0, 1, 0);
  64      ac.accordion("activate", ":last");
  65      state(ac, 0, 0, 1);
  66  });
  67  
  68  test("activate, jQuery or DOM element", function() {
  69      var ac = $('#list1').accordion({ active: $("#list1 a:last") });
  70      state(ac, 0, 0, 1);
  71      ac.accordion("activate", $("#list1 a:first"));
  72      state(ac, 1, 0, 0);
  73      ac.accordion("activate", $("#list1 a")[1]);
  74      state(ac, 0, 1, 0);
  75  });
  76  
  77  })(jQuery);


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7