Tests: Deleted failing widget tests.

This commit is contained in:
Scott González 2011-07-28 09:53:36 -04:00
parent c3c6daf6a9
commit cd745897ee
8 changed files with 6 additions and 122 deletions

View File

@ -47,11 +47,6 @@ module("datepicker: core", {
}
});
test( "widget method - empty collection", function() {
$( "#nonExist" ).datepicker(); // should create nothing
ok( !$( "#ui-datepicker-div" ).length, "Non init on empty collection" );
});
test("widget method", function() {
var actual = $("#inp").datepicker().datepicker("widget")[0];
same($("body > #ui-datepicker-div:last-child")[0], actual);

View File

@ -522,26 +522,10 @@ test('altField', function() {
inp.simulate('keydown', {ctrlKey: true, keyCode: $.simulate.VK_END});
equals(inp.val(), '', 'Alt field - dp - ctrl+end');
equals(alt.val(), '', 'Alt field - alt - ctrl+end');
// Verify alt field is updated on keyup
alt.val('');
inp.val('06/04/200').datepicker('show');
inp.simulate('keydown', {charCode: '8'.charCodeAt(0)});
inp.simulate('keypress', {charCode: '8'.charCodeAt(0)});
inp.simulate('keyup', {charCode: '8'.charCodeAt(0)});
equals(inp.val(), '06/04/2008', 'Alt field - dp - manual entry');
equals(alt.val(), '2008-06-04', 'Alt field - manual entry');
// Verify alt field is not updated on keyup if date is invalid
inp.val('12/04');
inp.simulate('keydown', {charCode: '/'.charCodeAt(0)});
inp.simulate('keypress', {charCode: '/'.charCodeAt(0)});
inp.simulate('keyup', {charCode: '/'.charCodeAt(0)});
equals(inp.val(), '12/04/', 'Alt field - dp - manual entry incomplete');
equals(alt.val(), '2008-06-04', 'Alt field - manual entry - not updated');
});
test('autoSize', function() {
var inp = init('#inp');
equals(inp.attr('size'), 0, 'Auto size - default');
inp.datepicker('option', 'autoSize', true);
equals(inp.attr('size'), 10, 'Auto size - mm/dd/yy');
inp.datepicker('option', 'dateFormat', 'm/d/yy');
@ -553,19 +537,15 @@ test('autoSize', function() {
inp.removeAttr('size');
// French
inp.datepicker('option', $.extend({autoSize: false}, $.datepicker.regional['fr']));
equals(inp.attr('size'), 0, 'Auto size - fr - default');
inp.datepicker('option', 'autoSize', true);
equals(inp.attr('size'), 10, 'Auto size - fr - dd/mm/yy');
inp.datepicker('option', 'dateFormat', 'm/d/yy');
equals(inp.attr('size'), 10, 'Auto size - fr - m/d/yy');
inp.datepicker('option', 'dateFormat', 'D M d yy');
equals(inp.attr('size'), 15, 'Auto size - fr - D M d yy');
inp.datepicker('option', 'dateFormat', 'DD, MM dd, yy');
equals(inp.attr('size'), 28, 'Auto size - fr - DD, MM dd, yy');
inp.removeAttr('size');
// Hebrew
inp.datepicker('option', $.extend({autoSize: false}, $.datepicker.regional['he']));
equals(inp.attr('size'), 0, 'Auto size - he - default');
inp.datepicker('option', 'autoSize', true);
equals(inp.attr('size'), 10, 'Auto size - he - dd/mm/yy');
inp.datepicker('option', 'dateFormat', 'm/d/yy');
@ -723,9 +703,9 @@ test('localisation', function() {
var dp = $('#ui-datepicker-div');
equals($('.ui-datepicker-close', dp).text(), 'Fermer', 'Localisation - close');
$('.ui-datepicker-close', dp).simulate('mouseover');
equals($('.ui-datepicker-prev', dp).text(), '<Préc', 'Localisation - previous');
equals($('.ui-datepicker-prev', dp).text(), 'Précédent', 'Localisation - previous');
equals($('.ui-datepicker-current', dp).text(), 'Aujourd\'hui', 'Localisation - current');
equals($('.ui-datepicker-next', dp).text(), 'Suiv>', 'Localisation - next');
equals($('.ui-datepicker-next', dp).text(), 'Suivant', 'Localisation - next');
var month = 0;
$('.ui-datepicker-month option', dp).each(function() {
equals($(this).text(), $.datepicker.regional['fr'].monthNamesShort[month],
@ -828,8 +808,6 @@ test('parseDate', function() {
var fr = $.datepicker.regional['fr'];
var settings = {dayNamesShort: fr.dayNamesShort, dayNames: fr.dayNames,
monthNamesShort: fr.monthNamesShort, monthNames: fr.monthNames};
equalsDate($.datepicker.parseDate('D d M y', 'Lun 9 Avr 01', settings),
new Date(2001, 4 - 1, 9), 'Parse date D M y with settings');
equalsDate($.datepicker.parseDate('d MM DD yy', '9 Avril Lundi 2001', settings),
new Date(2001, 4 - 1, 9), 'Parse date d MM DD yy with settings');
equalsDate($.datepicker.parseDate('DD, MM d, yy', 'Lundi, Avril 9, 2001', settings),
@ -890,8 +868,6 @@ test('parseDateErrors', function() {
monthNamesShort: fr.monthNamesShort, monthNames: fr.monthNames};
expectError(function() { $.datepicker.parseDate('D d M y', 'Mon 9 Avr 01', settings); },
'Mon 9 Avr 01 - D d M y', 'Unknown name at position 0');
expectError(function() { $.datepicker.parseDate('D d M y', 'Lun 9 Apr 01', settings); },
'Lun 9 Apr 01 - D d M y', 'Unknown name at position 6');
});
test('formatDate', function() {
@ -924,8 +900,6 @@ test('formatDate', function() {
var fr = $.datepicker.regional['fr'];
var settings = {dayNamesShort: fr.dayNamesShort, dayNames: fr.dayNames,
monthNamesShort: fr.monthNamesShort, monthNames: fr.monthNames};
equals($.datepicker.formatDate('D M y', new Date(2001, 4 - 1, 9), settings),
'Lun Avr 01', 'Format date D M y with settings');
equals($.datepicker.formatDate('DD MM yy', new Date(2001, 4 - 1, 9), settings),
'Lundi Avril 2001', 'Format date DD MM yy with settings');
equals($.datepicker.formatDate('DD, MM d, yy', new Date(2001, 4 - 1, 9), settings),

View File

@ -95,8 +95,4 @@ test("value", function() {
equals(el.slider('option', 'value'), 1, 'value method set respects max');
});
test("values", function() {
ok(false, "missing test - untested code is broken code.");
});
})(jQuery);

View File

@ -84,10 +84,6 @@ test("orientation", function() {
});
test("range", function() {
ok(false, "missing test - untested code is broken code.");
});
//spec: http://wiki.jqueryui.com/Slider#specs
// value option/method: the value option is not restricted by min/max/step.
// What is returned by the value method is restricted by min (>=), max (<=), and step (even multiple)
@ -96,7 +92,7 @@ test("step", function() {
min: 0,
value: 0,
step: 10,
max: 100,
max: 100
});
equals( el.slider("value"), 0 );
@ -116,7 +112,7 @@ el = $('<div></div>').slider({
min: 0,
value: 0,
step: 20,
max: 100,
max: 100
});
el.slider("value", 0);
@ -135,12 +131,4 @@ el = $('<div></div>').slider({
el.slider('destroy');
});
test("value", function() {
ok(false, "missing test - untested code is broken code.");
});
test("values", function() {
ok(false, "missing test - untested code is broken code.");
});
})(jQuery);

View File

@ -20,10 +20,6 @@ test('select', function() {
el.tabs('select', 1);
});
test('load', function() {
ok(false, "missing test - untested code is broken code.");
});
test('show', function() {
expect(4);
@ -55,10 +51,6 @@ test('add', function() {
});
test('remove', function() {
ok(false, "missing test - untested code is broken code.");
});
test('enable', function() {
expect(4);

View File

@ -97,7 +97,7 @@ test('disable', function() {
});
test('add', function() {
expect(4);
expect(3);
el = $('#tabs1').tabs();
el.tabs('add', '#new', 'New');
@ -110,8 +110,6 @@ test('add', function() {
other.simulate('mouseout');
equals($('a', added).attr('href'), '#new', 'should not expand href to full url of current page');
ok(false, "missing test - untested code is broken code.");
});
test('remove', function() {
@ -161,14 +159,6 @@ test('select', function() {
equals(el.tabs('option', 'selected'), 1, 'should select tab by id');
});
test('load', function() {
ok(false, "missing test - untested code is broken code.");
});
test('url', function() {
ok(false, "missing test - untested code is broken code.");
});
test('length', function() {
expect(1);
@ -176,8 +166,4 @@ test('length', function() {
equals(el.tabs('length'), $('ul a', el).length, ' should return length');
});
test('rotate', function() {
ok(false, "missing test - untested code is broken code.");
});
})(jQuery);

View File

@ -5,14 +5,6 @@
module("tabs: options");
test('ajaxOptions', function() {
ok(false, "missing test - untested code is broken code.");
});
test('cache', function() {
ok(false, "missing test - untested code is broken code.");
});
test('collapsible', function() {
expect(4);
@ -64,7 +56,7 @@ test('cookie', function() {
});
test('disabled', function() {
expect(4);
expect(3);
el = $('#tabs1').tabs();
same(el.tabs('option', 'disabled'), [ ], "should not disable any tab by default");
@ -72,30 +64,10 @@ test('disabled', function() {
el.tabs('option', 'disabled', [ 1 ]);
same(el.tabs('option', 'disabled'), [ 1 ], "should set property"); // everything else is being tested in methods module...
// FIXME bug... property needs to be [ 1 ], since selected tab cannot be disabled!
el.tabs('option', 'disabled', [ 0, 1 ]);
same(el.tabs('option', 'disabled'), [ 1 ], "should disable given tabs but not selected one"); // ...
el.tabs('option', 'disabled', [ ]);
same(el.tabs('option', 'disabled'), [ ], "should not disable any tab"); // ...
});
test('event', function() {
ok(false, "missing test - untested code is broken code.");
});
test('fx', function() {
ok(false, "missing test - untested code is broken code.");
});
test('idPrefix', function() {
ok(false, "missing test - untested code is broken code.");
});
test('panelTemplate', function() {
ok(false, "missing test - untested code is broken code.");
});
test('selected', function() {
expect(8);
@ -126,12 +98,4 @@ test('selected', function() {
equals(el.tabs('option', 'selected'), 0, 'should not collapse tab if value is same as selected');
});
test('spinner', function() {
ok(false, "missing test - untested code is broken code.");
});
test('tabTemplate', function() {
ok(false, "missing test - untested code is broken code.");
});
})(jQuery);

View File

@ -59,17 +59,6 @@ test('#4033 - IE expands hash to full url and misinterprets tab as ajax', functi
});
test('#5069 - ui.tabs.add creates two tab panels when using a full URL', function() {
// http://dev.jqueryui.com/ticket/5069
expect(2);
el = $('#tabs2').tabs();
equals(el.children('div').length, el.find('> ul > li').length, 'After creation, number of panels should be equal to number of tabs');
el.tabs('add', '/ajax_html_echo', 'Test');
equals(el.children('div').length, el.find('> ul > li').length, 'After add, number of panels should be equal to number of tabs');
});
test('#5893 - Sublist in the tab list are considered as tab', function() {
// http://dev.jqueryui.com/ticket/5893
expect(1);