8
0
Просмотр исходного кода

Merge pull request #53 from ckeditor/ckeditor5-engine/t/643

Changes required by changes in ckeditor5-engine.
Piotr Jasiun 9 лет назад
Родитель
Сommit
dacf957ed0

+ 2 - 2
packages/ckeditor5-undo/tests/undocommand.js

@@ -222,7 +222,7 @@ describe( 'UndoCommand', () => {
 				expect( root.childCount ).to.equal( 1 );
 				expect( itemAt( root, 0 ).name ).to.equal( 'p' );
 
-				expect( editor.document.selection.getFirstRange().isEqual( r( 0, 0 ) ) ).to.be.true;
+				expect( editor.document.selection.getFirstRange().isEqual( r( 1, 1 ) ) ).to.be.true;
 				expect( editor.document.selection.isBackward ).to.be.false;
 
 				undo._execute( batch1 );
@@ -234,7 +234,7 @@ describe( 'UndoCommand', () => {
 				expect( itemAt( root, 0 ).name ).to.equal( 'p' );
 
 				// Operations for undoing that batch were working on graveyard so document selection should not change.
-				expect( editor.document.selection.getFirstRange().isEqual( r( 0, 0 ) ) ).to.be.true;
+				expect( editor.document.selection.getFirstRange().isEqual( r( 1, 1 ) ) ).to.be.true;
 				expect( editor.document.selection.isBackward ).to.be.false;
 
 				expect( doc.graveyard.getChild( 0 ).maxOffset ).to.equal( 6 );

+ 2 - 2
packages/ckeditor5-undo/tests/undoengine-integration.js

@@ -229,7 +229,7 @@ describe( 'UndoEngine integration', () => {
 				input( 'fo[zb]ar' );
 
 				doc.batch().wrap( doc.selection.getFirstRange(), 'p' );
-				output( 'fo[<p>zb</p>]ar' );
+				output( 'fo<p>[zb]</p>ar' );
 
 				editor.execute( 'undo' );
 				output( 'fo[zb]ar' );
@@ -243,7 +243,7 @@ describe( 'UndoEngine integration', () => {
 
 				doc.batch().wrap( doc.selection.getFirstRange(), 'p' );
 				// Would be better if selection was inside P.
-				output( 'fo[<p>zb</p>]ar' );
+				output( 'fo<p>[zb]</p>ar' );
 
 				setSelection( [ 2, 0 ], [ 2, 1 ] );
 				doc.batch().move( doc.selection.getFirstRange(), new Position( root, [ 0 ] ) );