@@ -300,6 +300,12 @@ describe('markdown-toolbbar-element', function() {
300300 assert . equal ( '> |Butts|\n\nThe quick brown fox jumps over the lazy dog' , visualValue ( ) )
301301 } )
302302
303+ it ( 'quotes full line of text when you click the quote icon' , function ( ) {
304+ setVisualValue ( '|The quick brown fox jumps over the lazy dog' )
305+ clickToolbar ( 'md-quote' )
306+ assert . equal ( '> |The quick brown fox jumps over the lazy dog' , visualValue ( ) )
307+ } )
308+
303309 it ( 'prefixes newlines when quoting an existing line on an existing' , function ( ) {
304310 setVisualValue ( 'The quick brown fox jumps over the lazy dog|Butts|' )
305311 clickToolbar ( 'md-quote' )
@@ -351,12 +357,18 @@ describe('markdown-toolbbar-element', function() {
351357 } )
352358
353359 describe ( 'lists' , function ( ) {
354- it ( 'turns line into list when you click the unordered list icon' , function ( ) {
360+ it ( 'turns line into list when you click the unordered list icon with selection ' , function ( ) {
355361 setVisualValue ( 'One\n|Two|\nThree\n' )
356362 clickToolbar ( 'md-unordered-list' )
357363 assert . equal ( 'One\n\n- |Two|\n\nThree\n' , visualValue ( ) )
358364 } )
359365
366+ it ( 'turns line into list when you click the unordered list icon without selection' , function ( ) {
367+ setVisualValue ( 'One\n|Two and two\nThree\n' )
368+ clickToolbar ( 'md-unordered-list' )
369+ assert . equal ( 'One\n\n- |Two and two\n\nThree\n' , visualValue ( ) )
370+ } )
371+
360372 it ( 'turns multiple lines into list when you click the unordered list icon' , function ( ) {
361373 setVisualValue ( 'One\n|Two\nThree|\n' )
362374 clickToolbar ( 'md-unordered-list' )
@@ -383,6 +395,12 @@ describe('markdown-toolbbar-element', function() {
383395 assert . equal ( '|Two|' , visualValue ( ) )
384396 } )
385397
398+ it ( 'creates ordered list without selection' , function ( ) {
399+ setVisualValue ( 'apple\n|pear\nbanana\n' )
400+ clickToolbar ( 'md-ordered-list' )
401+ assert . equal ( 'apple\n\n|1. |\n\npear\nbanana\n' , visualValue ( ) )
402+ } )
403+
386404 it ( 'creates ordered list by selecting one line' , function ( ) {
387405 setVisualValue ( 'apple\n|pear|\nbanana\n' )
388406 clickToolbar ( 'md-ordered-list' )
0 commit comments