ソースを参照

Review writerSetSelection() API calls with single position.

Maciej Gołaszewski 7 年 前
コミット
5004216e92
1 ファイル変更2 行追加2 行削除
  1. 2 2
      packages/ckeditor5-basic-styles/tests/attributecommand.js

+ 2 - 2
packages/ckeditor5-basic-styles/tests/attributecommand.js

@@ -251,14 +251,14 @@ describe( 'AttributeCommand', () => {
 			// Attribute should be stored.
 			// Simulate clicking somewhere else in the editor.
 			model.change( writer => {
-				writer.setSelection( [ writer.createRange( writer.createPositionAt( root.getNodeByPath( [ 0 ] ), 2 ) ) ] );
+				writer.setSelection( root.getNodeByPath( [ 0 ] ), 2 );
 			} );
 
 			expect( command.value ).to.be.false;
 
 			// Go back to where attribute was stored.
 			model.change( writer => {
-				writer.setSelection( writer.createRange( writer.createPositionAt( root.getNodeByPath( [ 1 ] ), 0 ) ) );
+				writer.setSelection( root.getNodeByPath( [ 1 ] ), 0 );
 			} );
 
 			// Attribute should be restored.