Make sure that ambiguous val() selection works correctly.
This commit is contained in:
parent
c7c0677230
commit
879799fe95
4 changed files with 23 additions and 10 deletions
|
@ -307,7 +307,7 @@ test("removeAttr(String)", function() {
|
|||
});
|
||||
|
||||
test("val()", function() {
|
||||
expect(20);
|
||||
expect(23);
|
||||
|
||||
document.getElementById('text1').value = "bla";
|
||||
equals( jQuery("#text1").val(), "bla", "Check for modified value of input element" );
|
||||
|
@ -342,6 +342,14 @@ test("val()", function() {
|
|||
jQuery('#select4').attr('disabled', true);
|
||||
same( jQuery('#select4').val(), ['2', '3'], 'Call val() on disabled multiple="multiple" select' );
|
||||
|
||||
equals( jQuery('#select5').val(), "3", "Check value on ambiguous select." );
|
||||
|
||||
jQuery('#select5').val(1);
|
||||
equals( jQuery('#select5').val(), "1", "Check value on ambiguous select." );
|
||||
|
||||
jQuery('#select5').val(3);
|
||||
equals( jQuery('#select5').val(), "3", "Check value on ambiguous select." );
|
||||
|
||||
var checks = jQuery("<input type='checkbox' name='test' value='1'/><input type='checkbox' name='test' value='2'/><input type='checkbox' name='test' value=''/><input type='checkbox' name='test'/>").appendTo("#form");
|
||||
|
||||
same( checks.serialize(), "", "Get unchecked values." );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue