diff options
author | Oleg <markelog@gmail.com> | 2012-12-28 19:43:01 +0400 |
---|---|---|
committer | Oleg <markelog@gmail.com> | 2012-12-28 19:43:01 +0400 |
commit | b3e546c4eb0e14c5fefefa1e0c14026ba63f0017 (patch) | |
tree | b1baa5e069372870dff50003921746248a49530b /test | |
parent | 6215840995ae77f8d309ccaf58c6966b23925602 (diff) | |
download | jquery-b3e546c4eb0e14c5fefefa1e0c14026ba63f0017.tar.gz jquery-b3e546c4eb0e14c5fefefa1e0c14026ba63f0017.zip |
Rewrite tests for colgroup, caption
Add tests for thead, tbody, tfoot
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/manipulation.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 8054fd075..bf61045f4 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -395,13 +395,13 @@ var testAppendForObject = function( valueObj, isFragment ) { var testAppend = function( valueObj ) { - expect( 63 ); + expect( 66 ); testAppendForObject( valueObj, false ); testAppendForObject( valueObj, true ); var defaultText, result, message, iframe, iframeDoc, j, d, - $input, $radioChecked, $radioUnchecked, $radioParent, $map; + $input, $radioChecked, $radioUnchecked, $radioParent, $map, $table; defaultText = "Try them out:"; result = jQuery("#first").append( valueObj("<b>buga</b>") ); @@ -458,15 +458,16 @@ var testAppend = function( valueObj ) { equal( jQuery("#select1 optgroup").attr("label"), "optgroup", "Label attribute in newly inserted optgroup is correct" ); equal( jQuery("#select1 option:last").text(), "optgroup", "Appending optgroup" ); - jQuery("#table").append( valueObj("<colgroup></colgroup>") ); - equal( jQuery("#table colgroup").length, 1, "Append colgroup" ); + $table = jQuery("#table"); + + jQuery.each( "thead tbody tfoot colgroup caption".split(" "), function( i, name ) { + $table.append( valueObj( "<" + name + "/>" ) ); + equal( $table.find( name ).length, 1, "Append " + name ); + }); jQuery("#table colgroup").append( valueObj("<col/>") ); equal( jQuery("#table colgroup col").length, 1, "Append col" ); - jQuery("#table").append( valueObj("<caption></caption>") ); - equal( jQuery("#table caption").length, 1, "Append caption" ); - jQuery("#form") .append( valueObj("<select id='appendSelect1'></select>") ) .append( valueObj("<select id='appendSelect2'><option>Test</option></select>") ); |