" )
+ .css({ width: 100, height: 100 })
+ .text( "Droppable" );
+ element.after( newDroppable );
+ element.remove();
+ newDroppable.droppable( config );
+ }
+ },
+
+ draggable = $( "#draggable1" ).draggable(),
+ droppable1 = $( "#droppable1" ).droppable( config ),
+ droppable2 = $( "#droppable2" ).droppable( config ),
+
+ droppableOffset = droppable1.offset(),
+ draggableOffset = draggable.offset(),
+ dx = droppableOffset.left - draggableOffset.left,
+ dy = droppableOffset.top - draggableOffset.top;
+
+ draggable.simulate( "drag", {
+ dx: dx,
+ dy: dy
+ });
+
+ ok( !droppable2.hasClass( "active" ), "subsequent droppable no longer active" );
+});
-module("droppable: events");
-// this is here to make JSHint pass "unused", and we don't want to
-// remove the parameter for when we finally implement
-$.noop();
// todo: comment the following in when ready to actually test
/*
@@ -32,4 +60,4 @@ test("drop", function() {
});
*/
-})(jQuery);
+})( jQuery );
diff --git a/tests/unit/effects/effects.html b/tests/unit/effects/effects.html
index c283eabff..4538ecb03 100644
--- a/tests/unit/effects/effects.html
+++ b/tests/unit/effects/effects.html
@@ -96,7 +96,11 @@
-
+
+
+
Child Element Test
diff --git a/tests/unit/effects/effects_core.js b/tests/unit/effects/effects_core.js
index c9b1e1b4a..11e9d0b45 100644
--- a/tests/unit/effects/effects_core.js
+++ b/tests/unit/effects/effects_core.js
@@ -16,6 +16,24 @@ var minDuration = 15,
module( "effects.core" );
+// TODO: test all signatures of .show(), .hide(), .toggle().
+// Look at core's signatures and UI's signatures.
+asyncTest( ".hide() with step", function() {
+ expect( 1 );
+ var element = $( "#elem" ),
+ step = function() {
+ ok( true, "step callback invoked" );
+ step = $.noop;
+ };
+
+ element.hide({
+ step: function() {
+ step();
+ },
+ complete: start
+ });
+});
+
test( "Immediate Return Conditions", function() {
var hidden = $( "div.hidden" ),
count = 0;
@@ -28,6 +46,14 @@ test( "Immediate Return Conditions", function() {
equal( ++count, 3, "Both Functions worked properly" );
});
+test( ".hide() with hidden parent", function() {
+ expect( 1 );
+ var element = $( "div.hidden" ).children();
+ element.hide( "blind", function() {
+ equal( element.css( "display" ), "none", "display: none" );
+ });
+});
+
asyncTest( "Parse of null for options", function() {
var hidden = $( "div.hidden" ),
count = 0;
diff --git a/tests/unit/position/position_core.js b/tests/unit/position/position_core.js
index 7b51223ac..cefd7929c 100644
--- a/tests/unit/position/position_core.js
+++ b/tests/unit/position/position_core.js
@@ -221,7 +221,7 @@ test( "of", function() {
});
test( "offsets", function() {
- expect( 4 );
+ expect( 7 );
$( "#elx" ).position({
my: "left top",
@@ -254,6 +254,30 @@ test( "offsets", function() {
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 65, left: 37 }, "percentage offsets in my" );
+
+ $( "#elx" ).position({
+ my: "left-30.001% top+50.0%",
+ at: "left bottom",
+ of: "#parentx",
+ collision: "none"
+ });
+ deepEqual( $( "#elx" ).offset(), { top: 65, left: 37 }, "decimal percentage offsets in my" );
+
+ $( "#elx" ).position({
+ my: "left+10.4 top-10.6",
+ at: "left bottom",
+ of: "#parentx",
+ collision: "none"
+ });
+ deepEqual( $( "#elx" ).offset(), { top: 49, left: 50 }, "decimal offsets in my" );
+
+ $( "#elx" ).position({
+ my: "left+right top-left",
+ at: "left-top bottom-bottom",
+ of: "#parentx",
+ collision: "none"
+ });
+ deepEqual( $( "#elx" ).offset(), { top: 60, left: 40 }, "invalid offsets" );
});
test( "using", function() {
diff --git a/tests/unit/slider/slider_options.js b/tests/unit/slider/slider_options.js
index dfa94696a..f46dbde99 100644
--- a/tests/unit/slider/slider_options.js
+++ b/tests/unit/slider/slider_options.js
@@ -16,7 +16,7 @@ test( "disabled", function(){
var count = 0;
element = $( "#slider1" ).slider();
- element.on( "slidestart", function() {
+ element.bind( "slidestart", function() {
count++;
});
@@ -180,13 +180,13 @@ test( "values", function() {
document.createElement( "div" ),
document.createElement( "div" )
]).slider({
- range: true,
+ range: true,
values: [ 25, 75 ]
});
notStrictEqual(
- ranges.eq( 0 ).data( "uiSlider" ).options.values,
- ranges.eq( 1 ).data( "uiSlider" ).options.values,
+ ranges.eq( 0 ).data( "ui-slider" ).options.values,
+ ranges.eq( 1 ).data( "ui-slider" ).options.values,
"multiple range sliders should not have a reference to the same options.values array"
);
diff --git a/tests/unit/sortable/sortable.html b/tests/unit/sortable/sortable.html
index c23a15854..6e326a865 100644
--- a/tests/unit/sortable/sortable.html
+++ b/tests/unit/sortable/sortable.html
@@ -63,6 +63,27 @@
Item 5
+
+
+
+ 1 |
+ 2 |
+
+
+ 3 |
+ 4 |
+
+
+ 5 |
+ 6 |
+
+
+ 7 |
+ 8 |
+
+
+
+