Selaa lähdekoodia

Merge pull request #144 from ckeditor/t/ckeditor5-engine/1304

Internal: Using view.Selection public API. For more information see https://github.com/ckeditor/ckeditor5-engine/issues/1304.
Piotr Jasiun 7 vuotta sitten
vanhempi
commit
464ade89a0

+ 7 - 7
packages/ckeditor5-typing/tests/input.js

@@ -263,7 +263,7 @@ describe( 'Input feature', () => {
 			// This test case emulates spellchecker correction.
 
 			const viewSelection = new ViewSelection();
-			viewSelection._setTo( viewRoot.getChild( 0 ).getChild( 0 ), 6 );
+			viewSelection.setTo( viewRoot.getChild( 0 ).getChild( 0 ), 6 );
 
 			viewDocument.fire( 'mutations',
 				[ {
@@ -283,7 +283,7 @@ describe( 'Input feature', () => {
 			// This test case emulates spellchecker correction.
 
 			const viewSelection = new ViewSelection();
-			viewSelection._setTo( viewRoot.getChild( 0 ).getChild( 0 ), 6 );
+			viewSelection.setTo( viewRoot.getChild( 0 ).getChild( 0 ), 6 );
 
 			testUtils.sinon.spy( Writer.prototype, 'insert' );
 			testUtils.sinon.spy( Writer.prototype, 'remove' );
@@ -307,7 +307,7 @@ describe( 'Input feature', () => {
 			editor.setData( '<p>Foo hous a</p>' );
 
 			const viewSelection = new ViewSelection();
-			viewSelection._setTo( viewRoot.getChild( 0 ).getChild( 0 ), 9 );
+			viewSelection.setTo( viewRoot.getChild( 0 ).getChild( 0 ), 9 );
 
 			viewDocument.fire( 'mutations',
 				[ {
@@ -328,7 +328,7 @@ describe( 'Input feature', () => {
 			editor.setData( '<p>Bar athat foo</p>' );
 
 			const viewSelection = new ViewSelection();
-			viewSelection._setTo( viewRoot.getChild( 0 ).getChild( 0 ), 8 );
+			viewSelection.setTo( viewRoot.getChild( 0 ).getChild( 0 ), 8 );
 
 			viewDocument.fire( 'mutations',
 				[ {
@@ -349,7 +349,7 @@ describe( 'Input feature', () => {
 			editor.setData( '<p>Foo hous e</p>' );
 
 			const viewSelection = new ViewSelection();
-			viewSelection._setTo( viewRoot.getChild( 0 ).getChild( 0 ), 9 );
+			viewSelection.setTo( viewRoot.getChild( 0 ).getChild( 0 ), 9 );
 
 			viewDocument.fire( 'mutations',
 				[ {
@@ -369,8 +369,8 @@ describe( 'Input feature', () => {
 			editor.setData( '<p>Foo house</p>' );
 
 			const viewSelection = new ViewSelection();
-			viewSelection._setTo( viewRoot.getChild( 0 ).getChild( 0 ), 8 );
-			viewSelection._setFocus( viewRoot.getChild( 0 ).getChild( 0 ), 9 );
+			viewSelection.setTo( viewRoot.getChild( 0 ).getChild( 0 ), 8 );
+			viewSelection.setFocus( viewRoot.getChild( 0 ).getChild( 0 ), 9 );
 
 			viewDocument.fire( 'mutations',
 				[ {

+ 1 - 1
packages/ckeditor5-typing/tests/spellchecking.js

@@ -236,7 +236,7 @@ function emulateSpellcheckerMutation( editor, nodeIndex, resultPositionIndex, ol
 	const viewRoot = view.document.getRoot();
 	const viewSelection = new ViewSelection();
 
-	viewSelection._setTo( viewRoot.getChild( nodeIndex ).getChild( 0 ), resultPositionIndex );
+	viewSelection.setTo( viewRoot.getChild( nodeIndex ).getChild( 0 ), resultPositionIndex );
 
 	view.document.fire( 'mutations',
 		[ {