mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-28 18:04:46 +00:00
test for issue 2410, to verify that the button value is updated on refresh with new options
This commit is contained in:
parent
729757b465
commit
fab4f366a4
2 changed files with 19 additions and 1 deletions
|
|
@ -321,8 +321,12 @@
|
|||
<option value="long">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<select name="native-refresh" id="native-refresh">
|
||||
<option value="-1">default</option>
|
||||
<option value="-1">other</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="enhancetest">
|
||||
|
|
@ -333,5 +337,6 @@
|
|||
<option value="overnight">Overnight</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -44,4 +44,17 @@
|
|||
}
|
||||
], 300);
|
||||
});
|
||||
|
||||
// issue https://github.com/jquery/jquery-mobile/issues/2410
|
||||
test( "adding options and refreshing a native select defaults the text", function() {
|
||||
var select = $( "#native-refresh" ),
|
||||
button = select.siblings( '.ui-btn-inner' ),
|
||||
text = "foo";
|
||||
|
||||
same(button.text(), "default");
|
||||
select.find( "option" ).remove(); //remove the loading message
|
||||
select.append('<option value="1">' + text + '</option>');
|
||||
select.selectmenu('refresh');
|
||||
same(button.text(), text);
|
||||
});
|
||||
})(jQuery);
|
||||
Loading…
Reference in a new issue