@@ -300,6 +300,12 @@ describe('markdown-toolbbar-element', function() {
300
300
assert . equal ( '> |Butts|\n\nThe quick brown fox jumps over the lazy dog' , visualValue ( ) )
301
301
} )
302
302
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
+
303
309
it ( 'prefixes newlines when quoting an existing line on an existing' , function ( ) {
304
310
setVisualValue ( 'The quick brown fox jumps over the lazy dog|Butts|' )
305
311
clickToolbar ( 'md-quote' )
@@ -351,12 +357,18 @@ describe('markdown-toolbbar-element', function() {
351
357
} )
352
358
353
359
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 ( ) {
355
361
setVisualValue ( 'One\n|Two|\nThree\n' )
356
362
clickToolbar ( 'md-unordered-list' )
357
363
assert . equal ( 'One\n\n- |Two|\n\nThree\n' , visualValue ( ) )
358
364
} )
359
365
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
+
360
372
it ( 'turns multiple lines into list when you click the unordered list icon' , function ( ) {
361
373
setVisualValue ( 'One\n|Two\nThree|\n' )
362
374
clickToolbar ( 'md-unordered-list' )
@@ -383,6 +395,12 @@ describe('markdown-toolbbar-element', function() {
383
395
assert . equal ( '|Two|' , visualValue ( ) )
384
396
} )
385
397
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
+
386
404
it ( 'creates ordered list by selecting one line' , function ( ) {
387
405
setVisualValue ( 'apple\n|pear|\nbanana\n' )
388
406
clickToolbar ( 'md-ordered-list' )
0 commit comments