File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -831,6 +831,18 @@ describe('markdown-toolbar-element', function () {
831831 } )
832832
833833 describe ( 'header' , function ( ) {
834+ it ( 'sets the level correctly even when dynamically created' , function ( ) {
835+ const headerElement = document . createElement ( 'md-header' )
836+ headerElement . setAttribute ( 'level' , '2' )
837+ headerElement . textContent = 'h2'
838+ const toolbar = document . querySelector ( 'markdown-toolbar' )
839+ toolbar . appendChild ( headerElement )
840+
841+ setVisualValue ( '|title|' )
842+ clickToolbar ( 'md-header[level="2"]' )
843+ assert . equal ( '## |title|' , visualValue ( ) )
844+ } )
845+
834846 it ( 'inserts header syntax with cursor in description' , function ( ) {
835847 setVisualValue ( '|title|' )
836848 clickToolbar ( 'md-header' )
You can’t perform that action at this time.
0 commit comments