aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKlaus Hartl <klaus.hartl@googlemail.com>2008-12-22 11:44:30 +0000
committerKlaus Hartl <klaus.hartl@googlemail.com>2008-12-22 11:44:30 +0000
commit0fd2e8c91d9f8296aaea9fce7dbcd067fa836581 (patch)
tree5b86908de4a75da3b2aaf4be99ccfb81ad908274 /tests
parent1402ead00e322963d4d743e4dabaf23f12b525be (diff)
downloadjquery-ui-0fd2e8c91d9f8296aaea9fce7dbcd067fa836581.tar.gz
jquery-ui-0fd2e8c91d9f8296aaea9fce7dbcd067fa836581.zip
adopted proposed markup for 1.6, fixes #3651
Diffstat (limited to 'tests')
-rw-r--r--tests/tabs.js28
1 files changed, 17 insertions, 11 deletions
diff --git a/tests/tabs.js b/tests/tabs.js
index c11b2887d..5cbd9b705 100644
--- a/tests/tabs.js
+++ b/tests/tabs.js
@@ -13,16 +13,16 @@ var defaults = {
deselectable: false,
deselectableClass: 'ui-tabs-deselectable',
disabled: [],
- disabledClass: 'ui-tabs-disabled',
+ disabledClass: 'ui-state-disabled',
event: 'click',
fx: null,
hideClass: 'ui-tabs-hide',
idPrefix: 'ui-tabs-',
loadingClass: 'ui-tabs-loading',
- navClass: 'ui-tabs-nav',
- panelClass: 'ui-tabs-panel',
+ navClass: 'ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all',
+ panelClass: 'ui-tabs-panel ui-widget-content ui-corner-bottom',
panelTemplate: '<div></div>',
- selectedClass: 'ui-tabs-selected',
+ selectedClass: 'ui-tabs-selected ui-state-active',
spinner: 'Loading&#8230;',
tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>'
};
@@ -43,15 +43,21 @@ function defer(defered, ms) {
module('tabs');
test('init', function() {
- expect(4);
+ expect(9);
- var el = $('#tabs1 > ul').tabs();
+ var el = $('#tabs1').tabs(); // new markup requires to tabify wrapper again...
ok(true, '.tabs() called on element');
el.tabs('destroy').tabs({ selected: 1 });
+
+ ok( el.is('.ui-tabs.ui-widget.ui-widget-content.ui-corner-all'), 'attach classes to container');
+ ok( $('ul', el).is('.ui-tabs-nav.ui-helper-reset.ui-helper-clearfix.ui-widget-header.ui-corner-all'), 'attach classes to list' );
+ ok( $('div:eq(0)', el).is('.ui-tabs-panel.ui-widget-content.ui-corner-bottom'), 'attach classes to panel' );
+ ok( $('li:eq(0)', el).is('.ui-state-default.ui-corner-top'), 'attach classes to inactive li');
+ ok( $('li:eq(1)', el).is('.ui-tabs-selected.ui-state-active.ui-corner-top'), 'attach classes to active li');
equals( el.data('selected.tabs'), 1, 'selected.tabs set' );
equals( $('li', el).index( $('li.ui-tabs-selected', el) ), 1, 'second tab active');
- equals( $('div', '#tabs1').index( $('div.ui-tabs-hide', '#tabs1') ), 0, 'first panel should be hidden' );
+ equals( $('div', el).index( $('div.ui-tabs-hide', '#tabs1') ), 0, 'first panel should be hidden' );
});
@@ -61,12 +67,12 @@ module('tabs');
});
test("defaults", function() {
- el = $('#tabs1').tabs();
+ el = $('#tabs1 > ul').tabs();
$.each(defaults, function(key, val) {
- var actual = el.data(key + ".tabs"), expected = val;
+ var actual = el.data(key + '.tabs'), expected = val;
same(actual, expected, key);
});
- el.tabs("destroy");
+ el.tabs('destroy');
});
test('add', function() {
@@ -76,7 +82,7 @@ module('tabs');
test('remove', function() {
expect(0);
-
+
});
test('enable', function() {