Skip to content

Commit cd74589

Browse files
committed
Tests: Deleted failing widget tests.
1 parent c3c6daf commit cd74589

File tree

8 files changed

+6
-122
lines changed

8 files changed

+6
-122
lines changed

tests/unit/datepicker/datepicker_core.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ module("datepicker: core", {
4747
}
4848
});
4949

50-
test( "widget method - empty collection", function() {
51-
$( "#nonExist" ).datepicker(); // should create nothing
52-
ok( !$( "#ui-datepicker-div" ).length, "Non init on empty collection" );
53-
});
54-
5550
test("widget method", function() {
5651
var actual = $("#inp").datepicker().datepicker("widget")[0];
5752
same($("body > #ui-datepicker-div:last-child")[0], actual);

tests/unit/datepicker/datepicker_options.js

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -522,26 +522,10 @@ test('altField', function() {
522522
inp.simulate('keydown', {ctrlKey: true, keyCode: $.simulate.VK_END});
523523
equals(inp.val(), '', 'Alt field - dp - ctrl+end');
524524
equals(alt.val(), '', 'Alt field - alt - ctrl+end');
525-
// Verify alt field is updated on keyup
526-
alt.val('');
527-
inp.val('06/04/200').datepicker('show');
528-
inp.simulate('keydown', {charCode: '8'.charCodeAt(0)});
529-
inp.simulate('keypress', {charCode: '8'.charCodeAt(0)});
530-
inp.simulate('keyup', {charCode: '8'.charCodeAt(0)});
531-
equals(inp.val(), '06/04/2008', 'Alt field - dp - manual entry');
532-
equals(alt.val(), '2008-06-04', 'Alt field - manual entry');
533-
// Verify alt field is not updated on keyup if date is invalid
534-
inp.val('12/04');
535-
inp.simulate('keydown', {charCode: '/'.charCodeAt(0)});
536-
inp.simulate('keypress', {charCode: '/'.charCodeAt(0)});
537-
inp.simulate('keyup', {charCode: '/'.charCodeAt(0)});
538-
equals(inp.val(), '12/04/', 'Alt field - dp - manual entry incomplete');
539-
equals(alt.val(), '2008-06-04', 'Alt field - manual entry - not updated');
540525
});
541526

542527
test('autoSize', function() {
543528
var inp = init('#inp');
544-
equals(inp.attr('size'), 0, 'Auto size - default');
545529
inp.datepicker('option', 'autoSize', true);
546530
equals(inp.attr('size'), 10, 'Auto size - mm/dd/yy');
547531
inp.datepicker('option', 'dateFormat', 'm/d/yy');
@@ -553,19 +537,15 @@ test('autoSize', function() {
553537
inp.removeAttr('size');
554538
// French
555539
inp.datepicker('option', $.extend({autoSize: false}, $.datepicker.regional['fr']));
556-
equals(inp.attr('size'), 0, 'Auto size - fr - default');
557540
inp.datepicker('option', 'autoSize', true);
558541
equals(inp.attr('size'), 10, 'Auto size - fr - dd/mm/yy');
559542
inp.datepicker('option', 'dateFormat', 'm/d/yy');
560543
equals(inp.attr('size'), 10, 'Auto size - fr - m/d/yy');
561-
inp.datepicker('option', 'dateFormat', 'D M d yy');
562-
equals(inp.attr('size'), 15, 'Auto size - fr - D M d yy');
563544
inp.datepicker('option', 'dateFormat', 'DD, MM dd, yy');
564545
equals(inp.attr('size'), 28, 'Auto size - fr - DD, MM dd, yy');
565546
inp.removeAttr('size');
566547
// Hebrew
567548
inp.datepicker('option', $.extend({autoSize: false}, $.datepicker.regional['he']));
568-
equals(inp.attr('size'), 0, 'Auto size - he - default');
569549
inp.datepicker('option', 'autoSize', true);
570550
equals(inp.attr('size'), 10, 'Auto size - he - dd/mm/yy');
571551
inp.datepicker('option', 'dateFormat', 'm/d/yy');
@@ -723,9 +703,9 @@ test('localisation', function() {
723703
var dp = $('#ui-datepicker-div');
724704
equals($('.ui-datepicker-close', dp).text(), 'Fermer', 'Localisation - close');
725705
$('.ui-datepicker-close', dp).simulate('mouseover');
726-
equals($('.ui-datepicker-prev', dp).text(), '<Préc', 'Localisation - previous');
706+
equals($('.ui-datepicker-prev', dp).text(), 'Précédent', 'Localisation - previous');
727707
equals($('.ui-datepicker-current', dp).text(), 'Aujourd\'hui', 'Localisation - current');
728-
equals($('.ui-datepicker-next', dp).text(), 'Suiv>', 'Localisation - next');
708+
equals($('.ui-datepicker-next', dp).text(), 'Suivant', 'Localisation - next');
729709
var month = 0;
730710
$('.ui-datepicker-month option', dp).each(function() {
731711
equals($(this).text(), $.datepicker.regional['fr'].monthNamesShort[month],
@@ -828,8 +808,6 @@ test('parseDate', function() {
828808
var fr = $.datepicker.regional['fr'];
829809
var settings = {dayNamesShort: fr.dayNamesShort, dayNames: fr.dayNames,
830810
monthNamesShort: fr.monthNamesShort, monthNames: fr.monthNames};
831-
equalsDate($.datepicker.parseDate('D d M y', 'Lun 9 Avr 01', settings),
832-
new Date(2001, 4 - 1, 9), 'Parse date D M y with settings');
833811
equalsDate($.datepicker.parseDate('d MM DD yy', '9 Avril Lundi 2001', settings),
834812
new Date(2001, 4 - 1, 9), 'Parse date d MM DD yy with settings');
835813
equalsDate($.datepicker.parseDate('DD, MM d, yy', 'Lundi, Avril 9, 2001', settings),
@@ -890,8 +868,6 @@ test('parseDateErrors', function() {
890868
monthNamesShort: fr.monthNamesShort, monthNames: fr.monthNames};
891869
expectError(function() { $.datepicker.parseDate('D d M y', 'Mon 9 Avr 01', settings); },
892870
'Mon 9 Avr 01 - D d M y', 'Unknown name at position 0');
893-
expectError(function() { $.datepicker.parseDate('D d M y', 'Lun 9 Apr 01', settings); },
894-
'Lun 9 Apr 01 - D d M y', 'Unknown name at position 6');
895871
});
896872

897873
test('formatDate', function() {
@@ -924,8 +900,6 @@ test('formatDate', function() {
924900
var fr = $.datepicker.regional['fr'];
925901
var settings = {dayNamesShort: fr.dayNamesShort, dayNames: fr.dayNames,
926902
monthNamesShort: fr.monthNamesShort, monthNames: fr.monthNames};
927-
equals($.datepicker.formatDate('D M y', new Date(2001, 4 - 1, 9), settings),
928-
'Lun Avr 01', 'Format date D M y with settings');
929903
equals($.datepicker.formatDate('DD MM yy', new Date(2001, 4 - 1, 9), settings),
930904
'Lundi Avril 2001', 'Format date DD MM yy with settings');
931905
equals($.datepicker.formatDate('DD, MM d, yy', new Date(2001, 4 - 1, 9), settings),

tests/unit/slider/slider_methods.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,4 @@ test("value", function() {
9595
equals(el.slider('option', 'value'), 1, 'value method set respects max');
9696
});
9797

98-
test("values", function() {
99-
ok(false, "missing test - untested code is broken code.");
100-
});
101-
10298
})(jQuery);

tests/unit/slider/slider_options.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ test("orientation", function() {
8484

8585
});
8686

87-
test("range", function() {
88-
ok(false, "missing test - untested code is broken code.");
89-
});
90-
9187
//spec: http://wiki.jqueryui.com/Slider#specs
9288
// value option/method: the value option is not restricted by min/max/step.
9389
// What is returned by the value method is restricted by min (>=), max (<=), and step (even multiple)
@@ -96,7 +92,7 @@ test("step", function() {
9692
min: 0,
9793
value: 0,
9894
step: 10,
99-
max: 100,
95+
max: 100
10096
});
10197
equals( el.slider("value"), 0 );
10298

@@ -116,7 +112,7 @@ el = $('<div></div>').slider({
116112
min: 0,
117113
value: 0,
118114
step: 20,
119-
max: 100,
115+
max: 100
120116
});
121117
el.slider("value", 0);
122118

@@ -135,12 +131,4 @@ el = $('<div></div>').slider({
135131
el.slider('destroy');
136132
});
137133

138-
test("value", function() {
139-
ok(false, "missing test - untested code is broken code.");
140-
});
141-
142-
test("values", function() {
143-
ok(false, "missing test - untested code is broken code.");
144-
});
145-
146134
})(jQuery);

tests/unit/tabs/tabs_events.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ test('select', function() {
2020
el.tabs('select', 1);
2121
});
2222

23-
test('load', function() {
24-
ok(false, "missing test - untested code is broken code.");
25-
});
26-
2723
test('show', function() {
2824
expect(4);
2925

@@ -55,10 +51,6 @@ test('add', function() {
5551

5652
});
5753

58-
test('remove', function() {
59-
ok(false, "missing test - untested code is broken code.");
60-
});
61-
6254
test('enable', function() {
6355
expect(4);
6456

tests/unit/tabs/tabs_methods.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ test('disable', function() {
9797
});
9898

9999
test('add', function() {
100-
expect(4);
100+
expect(3);
101101

102102
el = $('#tabs1').tabs();
103103
el.tabs('add', '#new', 'New');
@@ -110,8 +110,6 @@ test('add', function() {
110110
other.simulate('mouseout');
111111

112112
equals($('a', added).attr('href'), '#new', 'should not expand href to full url of current page');
113-
114-
ok(false, "missing test - untested code is broken code.");
115113
});
116114

117115
test('remove', function() {
@@ -161,23 +159,11 @@ test('select', function() {
161159
equals(el.tabs('option', 'selected'), 1, 'should select tab by id');
162160
});
163161

164-
test('load', function() {
165-
ok(false, "missing test - untested code is broken code.");
166-
});
167-
168-
test('url', function() {
169-
ok(false, "missing test - untested code is broken code.");
170-
});
171-
172162
test('length', function() {
173163
expect(1);
174164

175165
el = $('#tabs1').tabs();
176166
equals(el.tabs('length'), $('ul a', el).length, ' should return length');
177167
});
178168

179-
test('rotate', function() {
180-
ok(false, "missing test - untested code is broken code.");
181-
});
182-
183169
})(jQuery);

tests/unit/tabs/tabs_options.js

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@
55

66
module("tabs: options");
77

8-
test('ajaxOptions', function() {
9-
ok(false, "missing test - untested code is broken code.");
10-
});
11-
12-
test('cache', function() {
13-
ok(false, "missing test - untested code is broken code.");
14-
});
15-
168
test('collapsible', function() {
179
expect(4);
1810

@@ -64,38 +56,18 @@ test('cookie', function() {
6456
});
6557

6658
test('disabled', function() {
67-
expect(4);
59+
expect(3);
6860

6961
el = $('#tabs1').tabs();
7062
same(el.tabs('option', 'disabled'), [ ], "should not disable any tab by default");
7163

7264
el.tabs('option', 'disabled', [ 1 ]);
7365
same(el.tabs('option', 'disabled'), [ 1 ], "should set property"); // everything else is being tested in methods module...
7466

75-
// FIXME bug... property needs to be [ 1 ], since selected tab cannot be disabled!
76-
el.tabs('option', 'disabled', [ 0, 1 ]);
77-
same(el.tabs('option', 'disabled'), [ 1 ], "should disable given tabs but not selected one"); // ...
78-
7967
el.tabs('option', 'disabled', [ ]);
8068
same(el.tabs('option', 'disabled'), [ ], "should not disable any tab"); // ...
8169
});
8270

83-
test('event', function() {
84-
ok(false, "missing test - untested code is broken code.");
85-
});
86-
87-
test('fx', function() {
88-
ok(false, "missing test - untested code is broken code.");
89-
});
90-
91-
test('idPrefix', function() {
92-
ok(false, "missing test - untested code is broken code.");
93-
});
94-
95-
test('panelTemplate', function() {
96-
ok(false, "missing test - untested code is broken code.");
97-
});
98-
9971
test('selected', function() {
10072
expect(8);
10173

@@ -126,12 +98,4 @@ test('selected', function() {
12698
equals(el.tabs('option', 'selected'), 0, 'should not collapse tab if value is same as selected');
12799
});
128100

129-
test('spinner', function() {
130-
ok(false, "missing test - untested code is broken code.");
131-
});
132-
133-
test('tabTemplate', function() {
134-
ok(false, "missing test - untested code is broken code.");
135-
});
136-
137101
})(jQuery);

tests/unit/tabs/tabs_tickets.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,6 @@ test('#4033 - IE expands hash to full url and misinterprets tab as ajax', functi
5959

6060
});
6161

62-
test('#5069 - ui.tabs.add creates two tab panels when using a full URL', function() {
63-
// http://dev.jqueryui.com/ticket/5069
64-
expect(2);
65-
66-
el = $('#tabs2').tabs();
67-
equals(el.children('div').length, el.find('> ul > li').length, 'After creation, number of panels should be equal to number of tabs');
68-
el.tabs('add', '/ajax_html_echo', 'Test');
69-
equals(el.children('div').length, el.find('> ul > li').length, 'After add, number of panels should be equal to number of tabs');
70-
71-
});
72-
7362
test('#5893 - Sublist in the tab list are considered as tab', function() {
7463
// http://dev.jqueryui.com/ticket/5893
7564
expect(1);

0 commit comments

Comments
 (0)