瀏覽代碼

Added block quote integration tests with lists.

Szymon Kupś 8 年之前
父節點
當前提交
3805867d27
共有 1 個文件被更改,包括 18 次插入0 次删除
  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', () => {