Selectmenu Tests: added labels to disabled empty visual test

This commit is contained in:
Felix Nagel 2013-04-29 21:34:10 +02:00
parent c1667ba01d
commit ad30163f1c

View File

@ -17,6 +17,7 @@
$('select#disabled1').selectmenu(); $('select#disabled1').selectmenu();
var withOverflow = $('select#disabled2').selectmenu(); var withOverflow = $('select#disabled2').selectmenu();
withOverflow.selectmenu("menuWidget").addClass("overflow"); withOverflow.selectmenu("menuWidget").addClass("overflow");
$('select#disabled3').selectmenu(); $('select#disabled3').selectmenu();
var disabled4 = $('select#disabled4').selectmenu(); var disabled4 = $('select#disabled4').selectmenu();
@ -55,7 +56,7 @@
}); });
/* empty */ /* empty */
$('select.empty').selectmenu(); $('.empty select').selectmenu();
}); });
</script> </script>
<style> <style>
@ -72,7 +73,7 @@
<form action="#"> <form action="#">
<h2>Disabled tests</h2> <h2>Disabled tests</h2>
<fieldset> <fieldset>
<label for="disabled1">Select a speed:</label> <label for="disabled1">Disabled select</label>
<select disabled="disabled" name="disabled1" id="disabled1"> <select disabled="disabled" name="disabled1" id="disabled1">
<option value="Slower">Slower</option> <option value="Slower">Slower</option>
<option value="Slow">Slow</option> <option value="Slow">Slow</option>
@ -82,7 +83,7 @@
</select> </select>
<br /> <br />
<br /> <br />
<label for="disabled2">Select a number:</label> <label for="disabled2">Disabled options</label>
<select name="disabled2" id="disabled2"> <select name="disabled2" id="disabled2">
<option value="1">1</option> <option value="1">1</option>
<option value="2" selected="selected">2</option> <option value="2" selected="selected">2</option>
@ -106,7 +107,7 @@
</select> </select>
<br /> <br />
<br /> <br />
<label for="disabled3">Select a file:</label> <label for="disabled3">Disabled optgroup</label>
<select name="disabled3" id="disabled3"> <select name="disabled3" id="disabled3">
<optgroup disabled="disabled" label="Scripts"> <optgroup disabled="disabled" label="Scripts">
<option value="jquery">jQuery.js</option> <option value="jquery">jQuery.js</option>
@ -119,7 +120,7 @@
</select> </select>
<br /> <br />
<br /> <br />
<label for="disabled4">Select a file:</label> <label for="disabled4">Disable specific element and refresh selectmenu on button click</label>
<select name="disabled4" id="disabled4"> <select name="disabled4" id="disabled4">
<optgroup label="Scripts"> <optgroup label="Scripts">
<option value="jquery">jQuery.js</option> <option value="jquery">jQuery.js</option>
@ -136,16 +137,19 @@
</fieldset> </fieldset>
<br /> <br />
<h2>Empty tests</h2> <h2>Empty tests</h2>
<fieldset> <fieldset class="empty">
<select name="speed1" class="empty"></select> <label for="empty1">Select with no option elements</label>
<select name="empty1" id="empty1"></select>
<br /> <br />
<br /> <br />
<select name="speed2" class="empty"> <label for="empty2">Select with one empty option element</label>
<select name="empty2" id="empty2">
<option value=""></option> <option value=""></option>
</select> </select>
<br /> <br />
<br /> <br />
<select name="number" class="empty"> <label for="empty3">Select with some empty option elements</label>
<select name="empty3" id="empty3">
<option value="1">1</option> <option value="1">1</option>
<option value="2" selected="selected">2</option> <option value="2" selected="selected">2</option>
<option value="3">3</option> <option value="3">3</option>
@ -158,7 +162,8 @@
</select> </select>
<br /> <br />
<br /> <br />
<select name="files" class="empty"> <label for="empty4">Select with empty optgroup</label>
<select name="empty4" class="empty4">
<optgroup label="Scripts"></optgroup> <optgroup label="Scripts"></optgroup>
<optgroup label="Other files"> <optgroup label="Other files">
<option value="somefile">Some unknown file</option> <option value="somefile">Some unknown file</option>