Skip to content

Commit fec36fd

Browse files
committed
Dev: remove todos from datepicker and dialog testsuite
1 parent b9f206d commit fec36fd

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

tests/unit/datepicker/datepicker_options.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,9 @@ test('altField', function() {
594594
});
595595

596596
test('autoSize', function() {
597-
expect( 14 );
597+
expect( 15 );
598598
var inp = TestHelpers.datepicker.init('#inp');
599-
// todo: figure out why this test fails in Opera 11.6
600-
//equal(inp.prop('size'), 20, 'Auto size - default');
599+
equal(inp.prop('size'), 20, 'Auto size - default');
601600
inp.datepicker('option', 'autoSize', true);
602601
equal(inp.prop('size'), 10, 'Auto size - mm/dd/yy');
603602
inp.datepicker('option', 'dateFormat', 'm/d/yy');

tests/unit/dialog/dialog_methods.js

+10-11
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ test("destroy", function() {
5959
});
6060
});
6161

62+
test("#4980: Destroy should place element back in original DOM position", function(){
63+
expect( 2 );
64+
var container = $('<div id="container"><div id="modal">Content</div></div>'),
65+
modal = container.find('#modal');
66+
modal.dialog();
67+
ok(!$.contains(container[0], modal[0]), 'dialog should move modal element to outside container element');
68+
modal.dialog('destroy');
69+
ok($.contains(container[0], modal[0]), 'dialog(destroy) should place element back in original DOM position');
70+
});
71+
6272
test( "enable/disable disabled", function() {
6373
expect( 2 );
6474
var el = $( "<div></div>" ).dialog();
@@ -137,17 +147,6 @@ test("open", function() {
137147
ok(el.dialog('widget').is(':visible') && !el.dialog('widget').is(':hidden'), 'dialog visible after open method called');
138148
});
139149

140-
// TODO merge this with the main destroy test
141-
test("#4980: Destroy should place element back in original DOM position", function(){
142-
expect( 2 );
143-
var container = $('<div id="container"><div id="modal">Content</div></div>'),
144-
modal = container.find('#modal');
145-
modal.dialog();
146-
ok(!$.contains(container[0], modal[0]), 'dialog should move modal element to outside container element');
147-
modal.dialog('destroy');
148-
ok($.contains(container[0], modal[0]), 'dialog(destroy) should place element back in original DOM position');
149-
});
150-
151150
test("#6137: dialog('open') causes form elements to reset on IE7", function() {
152151
expect(2);
153152

0 commit comments

Comments
 (0)