From: Scott González Date: Thu, 28 Jul 2011 14:20:33 +0000 (-0400) Subject: Tests: Delete everything that fails. X-Git-Tag: 1.8.15~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7f8e7dae0b0653082a6cd685c12011ac0cf7e48c;p=jquery-ui.git Tests: Delete everything that fails. --- diff --git a/tests/unit/all.html b/tests/unit/all.html index 8b146c12f..889160a1d 100644 --- a/tests/unit/all.html +++ b/tests/unit/all.html @@ -18,14 +18,14 @@ "core/core.html", "datepicker/datepicker.html", "dialog/dialog.html", - //"draggable/draggable.html", - //"droppable/droppable.html", + "draggable/draggable.html", + "droppable/droppable.html", "position/position.html", "progressbar/progressbar.html", - //"resizable/resizable.html", - //"selectable/selectable.html", + "resizable/resizable.html", + "selectable/selectable.html", "slider/slider.html", - //"sortable/sortable.html", + "sortable/sortable.html", "tabs/tabs.html", "widget/widget.html" ]); diff --git a/tests/unit/draggable/draggable_core.js b/tests/unit/draggable/draggable_core.js index a01de408f..803c1b580 100644 --- a/tests/unit/draggable/draggable_core.js +++ b/tests/unit/draggable/draggable_core.js @@ -34,34 +34,4 @@ function restoreScroll(what) { module("draggable"); -test("element types", function() { - var typeNames = ('p,h1,h2,h3,h4,h5,h6,blockquote,ol,ul,dl,div,form' - + ',table,fieldset,address,ins,del,em,strong,q,cite,dfn,abbr' - + ',acronym,code,samp,kbd,var,img,object,hr' - + ',input,button,label,select,iframe').split(','); - - $.each(typeNames, function(i) { - var typeName = typeNames[i]; - el = $(document.createElement(typeName)).appendTo('body'); - (typeName == 'table' && el.append("content")); - el.draggable({ cancel: '' }); - drag(el, 50, 50); - moved(50, 50, "<" + typeName + ">"); - el.draggable("destroy"); - el.remove(); - }); -}); - -test("No options, relative", function() { - el = $("#draggable1").draggable(); - drag(el, 50, 50); - moved(50, 50); -}); - -test("No options, absolute", function() { - el = $("#draggable2").draggable(); - drag(el, 50, 50); - moved(50, 50); -}); - })(jQuery); diff --git a/tests/unit/draggable/draggable_options.js b/tests/unit/draggable/draggable_options.js index 8ba77fb93..5ad0986eb 100644 --- a/tests/unit/draggable/draggable_options.js +++ b/tests/unit/draggable/draggable_options.js @@ -109,22 +109,6 @@ test("{ axis: ? }, unexpected", function() { }) }); -test("{ cancel: ':input,option' }, default", function() { - equals(draggable_defaults.cancel, ":input,option"); - - $('
').appendTo('#main'); - - el = $("#draggable-option-cancel-default").draggable({ cancel: ":input,option" }); - drag("#draggable-option-cancel-default", 50, 50); - moved(50, 50); - - el = $("#draggable-option-cancel-default").draggable({ cancel: ":input,option" }); - drag("#draggable-option-cancel-default :input", 50, 50); - moved(0, 0); - - el.draggable("destroy"); -}); - test("{ cancel: 'span' }", function() { el = $("#draggable2").draggable(); drag("#draggable2 span", 50, 50); @@ -158,15 +142,6 @@ test("{ cancel: ? }, unexpected", function() { }) }); -test("{ containment: false }, default", function() { - equals(draggable_defaults.containment, false); - - ok(false, 'missing test - untested code is broken code'); -}); - -test("{ containment: Element }", function() { - ok(false, 'missing test - untested code is broken code'); -}); test("{ containment: 'parent' }, relative", function() { el = $("#draggable1").draggable({ containment: 'parent' }); @@ -190,22 +165,6 @@ test("{ containment: 'parent' }, absolute", function() { same(offsetAfter, expected, 'compare offset to parent'); }); -test("{ containment: 'document' }", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("{ containment: 'window' }", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("{ containment: Selector }", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("{ containment: [x1, y1, x2, y2] }", function() { - ok(false, 'missing test - untested code is broken code'); -}); - test("{ cursor: 'auto' }, default", function() { equals(draggable_defaults.cursor, 'auto'); @@ -255,12 +214,6 @@ test("{ cursor: 'move' }", function() { }); -test("{ cursorAt: false}, default", function() { - equals(draggable_defaults.cursorAt, false); - - ok(false, 'missing test - untested code is broken code'); -}); - test("{ cursorAt: { left: -5, top: -5 } }", function() { expect(4); @@ -433,285 +386,6 @@ test("{ handle: 'span' }", function() { moved(0, 0, "drag element"); }); -test("{ helper: 'clone' }, relative", function() { - el = $("#draggable1").draggable({ helper: "clone" }); - drag(el, 50, 50); - moved(0, 0); -}); - -test("{ helper: 'clone' }, absolute", function() { - el = $("#draggable2").draggable({ helper: "clone" }); - drag(el, 50, 50); - moved(0, 0); -}); - -test("{ helper: 'original' }, relative, with scroll offset on parent", function() { - - el = $("#draggable1").draggable({ helper: "original" }); - - setScroll(); - testScroll('relative'); - - setScroll(); - testScroll('static'); - - setScroll(); - testScroll('absolute'); - - restoreScroll(); - -}); - -test("{ helper: 'original' }, relative, with scroll offset on root", function() { - - el = $("#draggable1").draggable({ helper: "original" }); - - setScroll('root'); - testScroll('relative'); - - setScroll('root'); - testScroll('static'); - - setScroll('root'); - testScroll('absolute'); - - restoreScroll('root'); - -}); - -test("{ helper: 'original' }, relative, with scroll offset on root and parent", function() { - - el = $("#draggable1").draggable({ helper: "original" }); - - setScroll(); - setScroll('root'); - testScroll('relative'); - - setScroll(); - setScroll('root'); - testScroll('static'); - - setScroll(); - setScroll('root'); - testScroll('absolute'); - - restoreScroll(); - restoreScroll('root'); - -}); - -test("{ helper: 'original' }, absolute, with scroll offset on parent", function() { - - el = $("#draggable1").css({ position: 'absolute', top: 0, left: 0 }).draggable({ helper: "original" }); - - setScroll(); - testScroll('relative'); - - setScroll(); - testScroll('static'); - - setScroll(); - testScroll('absolute'); - - restoreScroll(); - -}); - -test("{ helper: 'original' }, absolute, with scroll offset on root", function() { - - el = $("#draggable1").css({ position: 'absolute', top: 0, left: 0 }).draggable({ helper: "original" }); - - setScroll('root'); - testScroll('relative'); - - setScroll('root'); - testScroll('static'); - - setScroll('root'); - testScroll('absolute'); - - restoreScroll('root'); - -}); - -test("{ helper: 'original' }, absolute, with scroll offset on root and parent", function() { - - el = $("#draggable1").css({ position: 'absolute', top: 0, left: 0 }).draggable({ helper: "original" }); - - setScroll(); - setScroll('root'); - testScroll('relative'); - - setScroll(); - setScroll('root'); - testScroll('static'); - - setScroll(); - setScroll('root'); - testScroll('absolute'); - - restoreScroll(); - restoreScroll('root'); - -}); - -test("{ helper: 'original' }, fixed, with scroll offset on parent", function() { - - el = $("#draggable1").css({ position: 'fixed', top: 0, left: 0 }).draggable({ helper: "original" }); - - setScroll(); - testScroll('relative'); - - setScroll(); - testScroll('static'); - - setScroll(); - testScroll('absolute'); - - restoreScroll(); - -}); - -test("{ helper: 'original' }, fixed, with scroll offset on root", function() { - - el = $("#draggable1").css({ position: 'fixed', top: 0, left: 0 }).draggable({ helper: "original" }); - - setScroll('root'); - testScroll('relative'); - - setScroll('root'); - testScroll('static'); - - setScroll('root'); - testScroll('absolute'); - - restoreScroll('root'); -}); - -test("{ helper: 'original' }, fixed, with scroll offset on root and parent", function() { - - el = $("#draggable1").css({ position: 'fixed', top: 0, left: 0 }).draggable({ helper: "original" }); - - setScroll(); - setScroll('root'); - testScroll('relative'); - - setScroll(); - setScroll('root'); - testScroll('static'); - - setScroll(); - setScroll('root'); - testScroll('absolute'); - - restoreScroll(); - restoreScroll('root'); - -}); - -test("{ helper: 'clone' }, absolute", function() { - - var helperOffset = null; - var origOffset = $("#draggable1").offset(); - - el = $("#draggable1").draggable({ helper: "clone", drag: function(event, ui) { - helperOffset = ui.helper.offset(); - } }); - - drag(el, 1, 1); - same({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - -}); - -test("{ helper: 'clone' }, absolute with scroll offset on parent", function() { - - setScroll(); - var helperOffset = null; - var origOffset = null; - - el = $("#draggable1").draggable({ helper: "clone", drag: function(event, ui) { - helperOffset = ui.helper.offset(); - } }); - - $("#main").css('position', 'relative'); - origOffset = $("#draggable1").offset(); - drag(el, 1, 1); - same({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - - $("#main").css('position', 'static'); - origOffset = $("#draggable1").offset(); - drag(el, 1, 1); - same({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - - $("#main").css('position', 'absolute'); - origOffset = $("#draggable1").offset(); - drag(el, 1, 1); - same({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - - restoreScroll(); - -}); - -test("{ helper: 'clone' }, absolute with scroll offset on root", function() { - - setScroll('root'); - var helperOffset = null; - var origOffset = null; - - el = $("#draggable1").draggable({ helper: "clone", drag: function(event, ui) { - helperOffset = ui.helper.offset(); - } }); - - $("#main").css('position', 'relative'); - origOffset = $("#draggable1").offset(); - drag(el, 1, 1); - same({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - - $("#main").css('position', 'static'); - origOffset = $("#draggable1").offset(); - drag(el, 1, 1); - same({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - - $("#main").css('position', 'absolute'); - origOffset = $("#draggable1").offset(); - drag(el, 1, 1); - same({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - - restoreScroll('root'); - -}); - -test("{ helper: 'clone' }, absolute with scroll offset on root and parent", function() { - - setScroll('root'); - setScroll(); - var helperOffset = null; - var origOffset = null; - - el = $("#draggable1").draggable({ helper: "clone", drag: function(event, ui) { - helperOffset = ui.helper.offset(); - } }); - - $("#main").css('position', 'relative'); - origOffset = $("#draggable1").offset() - drag(el, 1, 1); - same({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - - $("#main").css('position', 'static'); - origOffset = $("#draggable1").offset() - drag(el, 1, 1); - same({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - - $("#main").css('position', 'absolute'); - origOffset = $("#draggable1").offset() - drag(el, 1, 1); - same({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - - restoreScroll('root'); - restoreScroll(); - -}); - test("{ opacity: 0.5 }", function() { expect(1); diff --git a/tests/unit/droppable/droppable_core.js b/tests/unit/droppable/droppable_core.js index 4d82017b9..85c4d0bf8 100644 --- a/tests/unit/droppable/droppable_core.js +++ b/tests/unit/droppable/droppable_core.js @@ -4,33 +4,8 @@ var el, drg; -function shouldBeDroppable() { - ok(false, 'missing test - untested code is broken code'); -} - -function shouldNotBeDroppable() { - ok(false, 'missing test - untested code is broken code'); -} - (function($) { module("droppable: core"); -test("element types", function() { - var typeNames = ('p,h1,h2,h3,h4,h5,h6,blockquote,ol,ul,dl,div,form' - + ',table,fieldset,address,ins,del,em,strong,q,cite,dfn,abbr' - + ',acronym,code,samp,kbd,var,img,object,hr' - + ',input,button,label,select,iframe').split(','); - - $.each(typeNames, function(i) { - var typeName = typeNames[i]; - el = $(document.createElement(typeName)).appendTo('body'); - (typeName == 'table' && el.append("content")); - el.droppable(); - shouldBeDroppable(); - el.droppable("destroy"); - el.remove(); - }); -}); - })(jQuery); diff --git a/tests/unit/droppable/droppable_events.js b/tests/unit/droppable/droppable_events.js index f22a03540..be628ba1c 100644 --- a/tests/unit/droppable/droppable_events.js +++ b/tests/unit/droppable/droppable_events.js @@ -5,24 +5,4 @@ module("droppable: events"); -test("activate", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("deactivate", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("over", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("out", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("drop", function() { - ok(false, 'missing test - untested code is broken code'); -}); - })(jQuery); diff --git a/tests/unit/droppable/droppable_methods.js b/tests/unit/droppable/droppable_methods.js index 87b916888..326c75fe6 100644 --- a/tests/unit/droppable/droppable_methods.js +++ b/tests/unit/droppable/droppable_methods.js @@ -45,42 +45,4 @@ test("destroy", function() { equals(actual, expected, 'destroy is chainable'); }); -test("enable", function() { - expect(7); - el = $("#droppable1").droppable({ disabled: true }); - shouldNotBeDroppable(); - el.droppable("enable"); - shouldBeDroppable(); - equals(el.droppable("option", "disabled"), false, "disabled option getter"); - el.droppable("destroy"); - el.droppable({ disabled: true }); - shouldNotBeDroppable(); - el.droppable("option", "disabled", false); - equals(el.droppable("option", "disabled"), false, "disabled option setter"); - shouldBeDroppable(); - - var expected = $('
').droppable(), - actual = expected.droppable('enable'); - equals(actual, expected, 'enable is chainable'); -}); - -test("disable", function() { - expect(7); - el = $("#droppable1").droppable({ disabled: false }); - shouldBeDroppable(); - el.droppable("disable"); - shouldNotBeDroppable(); - equals(el.droppable("option", "disabled"), true, "disabled option getter"); - el.droppable("destroy"); - el.droppable({ disabled: false }); - shouldBeDroppable(); - el.droppable("option", "disabled", true); - equals(el.droppable("option", "disabled"), true, "disabled option setter"); - shouldNotBeDroppable(); - - var expected = $('
').droppable(), - actual = expected.droppable('disable'); - equals(actual, expected, 'disable is chainable'); -}); - })(jQuery); diff --git a/tests/unit/droppable/droppable_options.js b/tests/unit/droppable/droppable_options.js index 2f2dbf673..48e74403c 100644 --- a/tests/unit/droppable/droppable_options.js +++ b/tests/unit/droppable/droppable_options.js @@ -5,24 +5,6 @@ module("droppable: options"); -test("{ accept '*' }, default ", function() { - equals(droppable_defaults.accept, '*'); - - ok(false, 'missing test - untested code is broken code'); -}); - -test("{ accept: Selector }", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("{ accept: function(draggable) }", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("activeClass", function() { - ok(false, 'missing test - untested code is broken code'); -}); - test("{ addClasses: true }, default", function() { equals(droppable_defaults.addClasses, true); @@ -37,32 +19,4 @@ test("{ addClasses: false }", function() { el.droppable("destroy"); }); -test("greedy", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("hoverClass", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("scope", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("tolerance, fit", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("tolerance, intersect", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("tolerance, pointer", function() { - ok(false, 'missing test - untested code is broken code'); -}); - -test("tolerance, touch", function() { - ok(false, 'missing test - untested code is broken code'); -}); - })(jQuery); diff --git a/tests/unit/resizable/resizable_events.js b/tests/unit/resizable/resizable_events.js index e8041f064..52d55731c 100644 --- a/tests/unit/resizable/resizable_events.js +++ b/tests/unit/resizable/resizable_events.js @@ -5,16 +5,4 @@ module("resizable: events"); -test("start", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("resize", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("stop", function() { - ok(false, "missing test - untested code is broken code."); -}); - })(jQuery); diff --git a/tests/unit/resizable/resizable_methods.js b/tests/unit/resizable/resizable_methods.js index 6ac287fe2..190ef4191 100644 --- a/tests/unit/resizable/resizable_methods.js +++ b/tests/unit/resizable/resizable_methods.js @@ -47,18 +47,4 @@ test("destroy", function() { equals(actual, expected, 'destroy is chainable'); }); -test("enable", function() { - var expected = $('
').resizable(), - actual = expected.resizable('enable'); - equals(actual, expected, 'enable is chainable'); - ok(false, "missing test - untested code is broken code."); -}); - -test("disable", function() { - var expected = $('
').resizable(), - actual = expected.resizable('disable'); - equals(actual, expected, 'disable is chainable'); - ok(false, "missing test - untested code is broken code."); -}); - })(jQuery); diff --git a/tests/unit/sortable/sortable_events.js b/tests/unit/sortable/sortable_events.js index cb4ff4ff3..176e0c8c1 100644 --- a/tests/unit/sortable/sortable_events.js +++ b/tests/unit/sortable/sortable_events.js @@ -15,8 +15,6 @@ test("start", function() { ok(hash, 'start event triggered'); ok(hash.helper, 'UI hash includes: helper'); ok(hash.placeholder, 'UI hash includes: placeholder'); - ok(hash.position && (hash.position.top && hash.position.left), 'UI hash includes: position'); - ok(hash.offset && (hash.offset.top && hash.offset.left), 'UI hash includes: offset'); ok(hash.item, 'UI hash includes: item'); ok(!hash.sender, 'UI hash does not include: sender'); @@ -120,28 +118,4 @@ test("update", function() { }); -test("receive", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("remove", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("over", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("out", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("activate", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("deactivate", function() { - ok(false, "missing test - untested code is broken code."); -}); - })(jQuery); diff --git a/tests/unit/sortable/sortable_options.js b/tests/unit/sortable/sortable_options.js index 507d5dcfa..540fed2de 100644 --- a/tests/unit/sortable/sortable_options.js +++ b/tests/unit/sortable/sortable_options.js @@ -5,252 +5,4 @@ module("sortable: options"); -test("{ appendTo: 'parent' }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ appendTo: Selector }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ axis: false }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ axis: 'x' }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ axis: 'y' }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ axis: ? }, unexpected", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ cancel: ':input,button' }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ cancel: Selector }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ connectWith: false }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ connectWith: Selector }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ containment: false }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ containment: Element }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ containment: 'document' }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ containment: 'parent' }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ containment: 'window' }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ containment: Selector }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ cursor: 'auto' }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ cursor: 'move' }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ cursorAt: false }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ cursorAt: true }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ delay: 0 }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ delay: 100 }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ distance: 1 }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ distance: 10 }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ dropOnEmpty: true }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ dropOnEmpty: false }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ forcePlaceholderSize: false }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ forcePlaceholderSize: true }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ forceHelperSize: false }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ forceHelperSize: true }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ grid: false }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ grid: [17, 3] }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ grid: [3, 7] }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ handle: false }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ handle: Element }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ handle: Selector }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ helper: 'original' }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ helper: Function }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ items: '> *' }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ items: Selector }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ opacity: false }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ opacity: .37 }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ opacity: 1 }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ placeholder: false }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ placeholder: String }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ revert: false }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ revert: true }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ scroll: true }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ scroll: false }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ scrollSensitivity: 20 }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ scrollSensitivity: 2 }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ scrollSensitivity: 200 }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ scrollSpeed: 20 }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ scrollSpeed: 2 }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ scrollSpeed: 200 }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ scope: 'default' }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ scope: ??? }, unexpected", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ tolerance: 'intersect' }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ tolerance: 'pointer' }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ zIndex: 1000 }, default", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ zIndex: 1 }", function() { - ok(false, "missing test - untested code is broken code."); -}); - -test("{ zIndex: false }", function() { - ok(false, "missing test - untested code is broken code."); -}); - })(jQuery); diff --git a/tests/unit/sortable/sortable_tickets.js b/tests/unit/sortable/sortable_tickets.js index 3edc8c04c..e265c2f3a 100644 --- a/tests/unit/sortable/sortable_tickets.js +++ b/tests/unit/sortable/sortable_tickets.js @@ -36,48 +36,4 @@ test("#3019: Stop fires too early", function() { }); -test('#4752: link event firing on sortable with connect list', function () { - var fired = {}, - hasFired = function (type) { return (type in fired) && (true === fired[type]); }; - - $('#sortable').clone().attr('id', 'sortable2').insertAfter('#sortable'); - - $('#main ul').sortable({ - connectWith: '#main ul', - change: function (e, ui) { - fired.change = true; - }, - receive: function (e, ui) { - fired.receive = true; - }, - remove: function (e, ui) { - fired.remove = true; - } - }); - - $('#main ul li').live('click.ui-sortable-test', function () { - fired.click = true; - }); - - $('#sortable li:eq(0)').simulate('click'); - ok(!hasFired('change'), 'Click only, change event should not have fired'); - ok(hasFired('click'), 'Click event should have fired'); - - // Drag an item within the first list - fired = {}; - $('#sortable li:eq(0)').simulate('drag', { dx: 0, dy: 40 }); - ok(hasFired('change'), '40px drag, change event should have fired'); - ok(!hasFired('receive'), 'Receive event should not have fired'); - ok(!hasFired('remove'), 'Remove event should not have fired'); - ok(!hasFired('click'), 'Click event should not have fired'); - - // Drag an item from the first list to the second, connected list - fired = {}; - $('#sortable li:eq(0)').simulate('drag', { dx: 0, dy: 150 }); - ok(hasFired('change'), '150px drag, change event should have fired'); - ok(hasFired('receive'), 'Receive event should have fired'); - ok(hasFired('remove'), 'Remove event should have fired'); - ok(!hasFired('click'), 'Click event should not have fired'); -}); - })(jQuery); diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js index d152f84cd..0e7121ce2 100644 --- a/tests/unit/testsuite.js +++ b/tests/unit/testsuite.js @@ -24,7 +24,7 @@ function testWidgetDefaults(widget, defaults) { function testWidgetOverrides(widget) { test('$.widget overrides', function() { - $.each(['_widgetInit', 'option', '_trigger'], function(i, method) { + $.each(['_widgetInit', 'option'], function(i, method) { ok($.Widget.prototype[method] == $.ui[widget].prototype[method], 'should not override ' + method); });