Skip to content
Permalink
Browse files

tabs unit tests: split tests into individual files, added some missin…

…g tests
  • Loading branch information
rdworth committed Feb 3, 2009
1 parent 497c246 commit 037f5d5ce193556ac977217056767e00a77e5c76
@@ -13,7 +13,12 @@
<script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
<script type="text/javascript" src="../../../external/cookie/jquery.cookie.js"></script>

<script type="text/javascript" src="tabs.js"></script>
<script type="text/javascript" src="tabs_core.js"></script>
<script type="text/javascript" src="tabs_defaults.js"></script>
<script type="text/javascript" src="tabs_events.js"></script>
<script type="text/javascript" src="tabs_methods.js"></script>
<script type="text/javascript" src="tabs_options.js"></script>
<script type="text/javascript" src="tabs_tickets.js"></script>
</head>
<body>
<div id="main">

This file was deleted.

@@ -5,8 +5,4 @@

module("tabs: core");

test("testname", function() {
ok(false, "missing test - untested code is broken code.");
});

})(jQuery);
@@ -3,7 +3,17 @@
*/

var tabs_defaults = {
disabled: false
ajaxOptions: null,
cache: false,
cookie: null,
collapsible: false,
disabled: [],
event: 'click',
fx: null,
idPrefix: 'ui-tabs-',
panelTemplate: '<div></div>',
spinner: 'Loading&#8230;',
tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>'
};

commonWidgetTests('tabs', { defaults: tabs_defaults });
@@ -5,7 +5,42 @@

module("tabs: events");

test("testname", function() {
test('select', function() {
ok(false, "missing test - untested code is broken code.");
});

test('load', function() {
ok(false, "missing test - untested code is broken code.");
});

test('show', function() {
expect(3);

var uiObj;
el = $('#tabs1').tabs({
show: function(event, ui) {
uiObj = ui;
}
});
equals(uiObj.tab, $('#tabs1 a')[0], 'should have tab as DOM anchor element');
equals(uiObj.panel, $('#tabs1 div')[0], 'should have panel as DOM div element');
equals(uiObj.index, 0, ' should have index');

});

test('add', function() {
ok(false, "missing test - untested code is broken code.");
});

test('remove', function() {
ok(false, "missing test - untested code is broken code.");
});

test('enable', function() {
ok(false, "missing test - untested code is broken code.");
});

test('disable', function() {
ok(false, "missing test - untested code is broken code.");
});

0 comments on commit 037f5d5

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