Dev: remove todos from datepicker and dialog testsuite

This commit is contained in:
Mike Sherov 2012-12-12 03:16:33 -05:00
parent b9f206dbcf
commit fec36fd214
2 changed files with 12 additions and 14 deletions

View File

@ -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');

View File

@ -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);