Add tests for default tabpanel hidden states

This commit is contained in:
conzett
2011-11-22 21:03:32 -05:00
parent 8aa95004fc
commit 2cd63df1b7
2 changed files with 29 additions and 4 deletions

View File

@ -225,4 +225,27 @@ $(document).ready(function () {
});
test("Initialization should set display correctly", function () {
var tabContainer = $('#qunit-fixture #tab-container');
var tabList = $(tabContainer).find('> ul');
var tabPanels = $(tabContainer).children().not('ul');
var tabs = tabList.find('li');
tabContainer.skeletonTabs();
$(tabPanels).each(function(index) {
if(index != 0){
ok($(this).is(':hidden'),
'Expect tabpanel at position ' + index + ' to be hidden');
}else{
ok($(this).not(':hidden'),
'Expect tabpanel at position ' + index + ' to not be hidden');
}
});
});
});