diff options
Diffstat (limited to 'tests/unit/resizable/resizable_core.js')
-rw-r--r-- | tests/unit/resizable/resizable_core.js | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/tests/unit/resizable/resizable_core.js b/tests/unit/resizable/resizable_core.js index a1ac22272..447499f05 100644 --- a/tests/unit/resizable/resizable_core.js +++ b/tests/unit/resizable/resizable_core.js @@ -26,7 +26,7 @@ test("element types", function() { */ test("n", function() { - expect(2); + expect(4); var handle = '.ui-resizable-n', target = $('#resizable1').resizable({ handles: 'all' }); @@ -35,10 +35,13 @@ test("n", function() { TestHelpers.resizable.drag(handle, 0, 50); equal( target.height(), 100, "compare height" ); + + equal( target[0].style.left, "", "left should not be modified" ); + equal( target[0].style.width, "", "width should not be modified" ); }); test("s", function() { - expect(2); + expect(5); var handle = '.ui-resizable-s', target = $('#resizable1').resizable({ handles: 'all' }); @@ -47,10 +50,14 @@ test("s", function() { TestHelpers.resizable.drag(handle, 0, -50); equal( target.height(), 100, "compare height" ); + + equal( target[0].style.top, "", "top should not be modified" ); + equal( target[0].style.left, "", "left should not be modified" ); + equal( target[0].style.width, "", "width should not be modified" ); }); test("e", function() { - expect(2); + expect(5); var handle = '.ui-resizable-e', target = $('#resizable1').resizable({ handles: 'all' }); @@ -59,10 +66,14 @@ test("e", function() { TestHelpers.resizable.drag(handle, -50); equal( target.width(), 100, "compare width" ); + + equal( target[0].style.height, "", "height should not be modified" ); + equal( target[0].style.top, "", "top should not be modified" ); + equal( target[0].style.left, "", "left should not be modified" ); }); test("w", function() { - expect(2); + expect(4); var handle = '.ui-resizable-w', target = $('#resizable1').resizable({ handles: 'all' }); @@ -71,10 +82,13 @@ test("w", function() { TestHelpers.resizable.drag(handle, 50); equal( target.width(), 100, "compare width" ); + + equal( target[0].style.height, "", "height should not be modified" ); + equal( target[0].style.top, "", "top should not be modified" ); }); test("ne", function() { - expect(4); + expect(5); var handle = '.ui-resizable-ne', target = $('#resizable1').css({ overflow: 'hidden' }).resizable({ handles: 'all' }); @@ -85,10 +99,12 @@ test("ne", function() { TestHelpers.resizable.drag(handle, 50, 50); equal( target.width(), 100, "compare width" ); equal( target.height(), 100, "compare height" ); + + equal( target[0].style.left, "", "left should not be modified" ); }); test("se", function() { - expect(4); + expect(6); var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all' }); @@ -99,10 +115,13 @@ test("se", function() { TestHelpers.resizable.drag(handle, -50, -50); equal( target.width(), 100, "compare width" ); equal( target.height(), 100, "compare height" ); + + equal( target[0].style.top, "", "top should not be modified" ); + equal( target[0].style.left, "", "left should not be modified" ); }); test("sw", function() { - expect(4); + expect(5); var handle = '.ui-resizable-sw', target = $('#resizable1').resizable({ handles: 'all' }); @@ -113,6 +132,8 @@ test("sw", function() { TestHelpers.resizable.drag(handle, 50, 50); equal( target.width(), 100, "compare width" ); equal( target.height(), 100, "compare height" ); + + equal( target[0].style.top, "", "top should not be modified" ); }); test("nw", function() { |