|
|
@@ -631,7 +631,7 @@ describe( 'Differ', () => {
|
|
|
} );
|
|
|
|
|
|
// https://github.com/ckeditor/ckeditor5-engine/issues/1664
|
|
|
- it( 'move to the same position', () => {
|
|
|
+ it( 'move to the same position #1', () => {
|
|
|
const position = new Position( root, [ 0 ] );
|
|
|
|
|
|
model.change( () => {
|
|
|
@@ -640,6 +640,27 @@ describe( 'Differ', () => {
|
|
|
expectChanges( [] );
|
|
|
} );
|
|
|
} );
|
|
|
+
|
|
|
+ // https://github.com/ckeditor/ckeditor5-engine/issues/1664
|
|
|
+ it( 'move to the same position #2', () => {
|
|
|
+ const sourcePosition = new Position( root, [ 0 ] );
|
|
|
+ const targetPosition = new Position( root, [ 2 ] );
|
|
|
+
|
|
|
+ root._appendChild( [
|
|
|
+ new Element( 'paragraph', null, [
|
|
|
+ new Text( 'x' )
|
|
|
+ ] ),
|
|
|
+ new Element( 'paragraph', null, [
|
|
|
+ new Text( 'y' )
|
|
|
+ ] )
|
|
|
+ ] );
|
|
|
+
|
|
|
+ model.change( () => {
|
|
|
+ move( sourcePosition, 2, targetPosition );
|
|
|
+
|
|
|
+ expectChanges( [] );
|
|
|
+ } );
|
|
|
+ } );
|
|
|
} );
|
|
|
|
|
|
describe( 'rename', () => {
|