Skip to content
Permalink
Browse files

Dev: remove todos from datepicker and dialog testsuite

  • Loading branch information...
mikesherov committed Dec 12, 2012
1 parent b9f206d commit fec36fd2140a1e88b0a6584f4e9d42a0495d395a
Showing with 12 additions and 14 deletions.
  1. +2 −3 tests/unit/datepicker/datepicker_options.js
  2. +10 −11 tests/unit/dialog/dialog_methods.js
@@ -594,10 +594,9 @@ test('altField', function() {
});

test('autoSize', function() {
expect( 14 );
expect( 15 );
var inp = TestHelpers.datepicker.init('#inp');
// todo: figure out why this test fails in Opera 11.6
//equal(inp.prop('size'), 20, 'Auto size - default');
equal(inp.prop('size'), 20, 'Auto size - default');
inp.datepicker('option', 'autoSize', true);
equal(inp.prop('size'), 10, 'Auto size - mm/dd/yy');
inp.datepicker('option', 'dateFormat', 'm/d/yy');
@@ -59,6 +59,16 @@ test("destroy", function() {
});
});

test("#4980: Destroy should place element back in original DOM position", function(){
expect( 2 );
var container = $('<div id="container"><div id="modal">Content</div></div>'),
modal = container.find('#modal');
modal.dialog();
ok(!$.contains(container[0], modal[0]), 'dialog should move modal element to outside container element');
modal.dialog('destroy');
ok($.contains(container[0], modal[0]), 'dialog(destroy) should place element back in original DOM position');
});

test( "enable/disable disabled", function() {
expect( 2 );
var el = $( "<div></div>" ).dialog();
@@ -137,17 +147,6 @@ test("open", function() {
ok(el.dialog('widget').is(':visible') && !el.dialog('widget').is(':hidden'), 'dialog visible after open method called');
});

// TODO merge this with the main destroy test
test("#4980: Destroy should place element back in original DOM position", function(){
expect( 2 );
var container = $('<div id="container"><div id="modal">Content</div></div>'),
modal = container.find('#modal');
modal.dialog();
ok(!$.contains(container[0], modal[0]), 'dialog should move modal element to outside container element');
modal.dialog('destroy');
ok($.contains(container[0], modal[0]), 'dialog(destroy) should place element back in original DOM position');
});

test("#6137: dialog('open') causes form elements to reset on IE7", function() {
expect(2);

0 comments on commit fec36fd

Please sign in to comment.
You can’t perform that action at this time.