Skip to content
Permalink
Browse files

Selectmenu Tests: rename wrapper divs

  • Loading branch information...
fnagel committed Apr 29, 2013
1 parent 026f517 commit 4d986a46b50f59b27cae96eec62119fc50c0c73d
Showing with 10 additions and 10 deletions.
  1. +2 −2 tests/unit/selectmenu/selectmenu.html
  2. +8 −8 tests/unit/selectmenu/selectmenu_options.js
@@ -38,9 +38,9 @@ <h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">
<div id="sm-wrap1" class="sm-wrap"></div>
<div id="selectmenu-wrap1" class="selectmenu-wrap"></div>

<div id="sm-wrap2" class="sm-wrap">
<div id="selectmenu-wrap2" class="selectmenu-wrap">
<label for="speed">Select a speed:</label>
<select name="speed" id="speed">
<option value="Slower">Slower</option>
@@ -11,20 +11,20 @@ test( "appendTo another element", function () {
element.selectmenu( "destroy" );

element.selectmenu({
appendTo: ".sm-wrap"
appendTo: ".selectmenu-wrap"
});
equal( element.selectmenu( "menuWidget" ).parent().parent()[0], $( "#sm-wrap1" )[0], "first found element" );
equal( $( "#sm-wrap2 .ui-selectmenu" ).length, 0, "only appends to one element" );
equal( element.selectmenu( "menuWidget" ).parent().parent()[0], $( "#selectmenu-wrap1" )[0], "first found element" );
equal( $( "#selectmenu-wrap2 .ui-selectmenu" ).length, 0, "only appends to one element" );
element.selectmenu( "destroy" );

$( "#sm-wrap2" ).addClass( "ui-front" );
$( "#selectmenu-wrap2" ).addClass( "ui-front" );
element.selectmenu();
equal( element.selectmenu( "menuWidget" ).parent().parent()[0], $( "#sm-wrap2" )[0], "null, inside .ui-front" );
equal( element.selectmenu( "menuWidget" ).parent().parent()[0], $( "#selectmenu-wrap2" )[0], "null, inside .ui-front" );
element.selectmenu( "destroy" );
$( "#sm-wrap2" ).removeClass( "ui-front" );
$( "#selectmenu-wrap2" ).removeClass( "ui-front" );

element.selectmenu().selectmenu( "option", "appendTo", "#sm-wrap1" );
equal( element.selectmenu( "menuWidget" ).parent().parent()[0], $( "#sm-wrap1" )[0], "modified after init" );
element.selectmenu().selectmenu( "option", "appendTo", "#selectmenu-wrap1" );
equal( element.selectmenu( "menuWidget" ).parent().parent()[0], $( "#selectmenu-wrap1" )[0], "modified after init" );
element.selectmenu( "destroy" );

element.selectmenu({

0 comments on commit 4d986a4

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