mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Button: Add tests for button with html markup
Ref gh-1632 Ref jquery/api.jqueryui.com#281
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
<div id="qunit-fixture">
|
||||
<form id="form1">
|
||||
<div><button id="button">Label</button></div>
|
||||
<div><button id="button2">label <span>with span</span></button></div>
|
||||
|
||||
<div><input id="submit" type="submit" value="Label"></div>
|
||||
</form>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<div id="qunit-fixture">
|
||||
|
||||
<div class="buttonset"><button id="button">Label</button><button>button 2</button></div>
|
||||
<div><button id="button2">label <span>with span</span></button></div>
|
||||
|
||||
<div id="radio0" style="margin-top: 2em;">
|
||||
<input type="radio" id="radio01" name="radio" checked="checked"><label for="radio01">Choice 1</label>
|
||||
|
||||
@@ -76,6 +76,15 @@ test( "label, default", function() {
|
||||
deepEqual( button.button( "option", "label" ), "Label" );
|
||||
} );
|
||||
|
||||
test( "label, with html markup", function() {
|
||||
expect( 3 );
|
||||
var button = $( "#button2" ).button();
|
||||
|
||||
deepEqual( button.text(), "label with span" );
|
||||
deepEqual( button.html().toLowerCase(), "label <span>with span</span>" );
|
||||
deepEqual( button.button( "option", "label" ).toLowerCase(), "label <span>with span</span>" );
|
||||
} );
|
||||
|
||||
test( "label, explicit value", function() {
|
||||
expect( 2 );
|
||||
var button = $( "#button" ).button( {
|
||||
|
||||
Reference in New Issue
Block a user