Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Changes required by changes in ckeditor5-engine. #53

Merged
merged 2 commits into from
Dec 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/undocommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions tests/undoengine-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand All @@ -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 ] ) );
Expand Down