Skip to content

Commit 564b793

Browse files
committed
Add test to assert if the html tag is correctly set
1 parent c22ba5b commit 564b793

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/unit/dialog/core.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,16 @@ QUnit.test( "aria-modal", function( assert ) {
117117
element.remove();
118118
} );
119119

120+
QUnit.test( "ui dialog title tagname", function( assert ) {
121+
assert.expect( 1 );
122+
123+
var element, wrapper;
124+
125+
element = $( "<div>" ).dialog( { modal: true, uiDialogTitleTagName: "h2" } );
126+
wrapper = document.querySelector( ".ui-dialog-title" );
127+
assert.equal( wrapper.tagName(), "h2", "The dialog title element is h2" );
128+
} );
129+
120130
QUnit.test( "widget method", function( assert ) {
121131
assert.expect( 1 );
122132
var dialog = $( "<div>" ).appendTo( "#qunit-fixture" ).dialog();

0 commit comments

Comments
 (0)