Bladeren bron

Aligned tests to the architecture changes.

Szymon Kupś 8 jaren geleden
bovenliggende
commit
87ec67aed5
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      packages/ckeditor5-autoformat/tests/autoformat.js

+ 2 - 2
packages/ckeditor5-autoformat/tests/autoformat.js

@@ -94,7 +94,7 @@ describe( 'Autoformat', () => {
 		it( 'should replace digit with numbered list item using the parenthesis format', () => {
 			setData( doc, '<paragraph>1)[]</paragraph>' );
 			doc.enqueueChanges( () => {
-				batch.insert( doc.selection.getFirstPosition(), ' ' );
+				batch.insertText( ' ', doc.selection.getFirstPosition() );
 			} );
 
 			expect( getData( doc ) ).to.equal( '<listItem indent="0" type="numbered">[]</listItem>' );
@@ -103,7 +103,7 @@ describe( 'Autoformat', () => {
 		it( 'should not replace digit character when there is no . or ) in the format', () => {
 			setData( doc, '<paragraph>1[]</paragraph>' );
 			doc.enqueueChanges( () => {
-				batch.insert( doc.selection.getFirstPosition(), ' ' );
+				batch.insertText( ' ', doc.selection.getFirstPosition() );
 			} );
 
 			expect( getData( doc ) ).to.equal( '<paragraph>1 []</paragraph>' );