Browse Source

Added block quote integration tests with lists.

Szymon Kupś 8 years ago
parent
commit
3805867d27
1 changed files with 18 additions and 0 deletions
  1. 18 0
      packages/ckeditor5-autoformat/tests/autoformat.js

+ 18 - 0
packages/ckeditor5-autoformat/tests/autoformat.js

@@ -127,6 +127,24 @@ describe( 'Autoformat', () => {
 
 			expect( getData( doc ) ).to.equal( '<heading1>> []</heading1>' );
 		} );
+
+		it( 'should not replace greater-than character when inside numbered list', () => {
+			setData( doc, '<listItem indent="0" type="numbered">1. >[]</listItem>' );
+			doc.enqueueChanges( () => {
+				batch.insert( doc.selection.getFirstPosition(), ' ' );
+			} );
+
+			expect( getData( doc ) ).to.equal( '<listItem indent="0" type="numbered">1. > []</listItem>' );
+		} );
+
+		it( 'should not replace greater-than character when inside buletted list', () => {
+			setData( doc, '<listItem indent="0" type="bulleted">1. >[]</listItem>' );
+			doc.enqueueChanges( () => {
+				batch.insert( doc.selection.getFirstPosition(), ' ' );
+			} );
+
+			expect( getData( doc ) ).to.equal( '<listItem indent="0" type="bulleted">1. > []</listItem>' );
+		} );
 	} );
 
 	describe( 'Inline autoformat', () => {