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

Commit

Permalink
Merge pull request #81 from ckeditor/t/ckeditor5-engine/738
Browse files Browse the repository at this point in the history
Other: Aligned code to the changes API in `ckeditor5-engine`. Read more ckeditor/ckeditor5-engine#738.
  • Loading branch information
szymonkups committed Mar 9, 2018
2 parents 8ae86bd + 4a37320 commit 7e515dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions tests/undocommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import ModelTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/modeltestedit
import Range from '@ckeditor/ckeditor5-engine/src/model/range';
import Position from '@ckeditor/ckeditor5-engine/src/model/position';
import Batch from '@ckeditor/ckeditor5-engine/src/model/batch';
import Text from '@ckeditor/ckeditor5-engine/src/model/text';
import UndoCommand from '../src/undocommand';
import { itemAt, getText } from '@ckeditor/ckeditor5-engine/tests/model/_utils/utils';

Expand Down Expand Up @@ -312,7 +311,10 @@ describe( 'UndoCommand', () => {
return text;
}

root.appendChildren( new Text( 'abcdef' ) );
model.change( writer => {
writer.appendText( 'abcdef', root );
} );

expect( getCaseText( root ) ).to.equal( 'abcdef' );

model.change( writer => {
Expand Down
4 changes: 3 additions & 1 deletion tests/undoediting-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,9 @@ describe( 'UndoEditing integration', () => {
input( '<paragraph>Foo</paragraph><paragraph>Bar</paragraph>' );

// Remove children from graveyard because they are inserted there after `input` call.
doc.graveyard.removeChildren( 0, doc.graveyard.childCount );
model.change( writer => {
writer.remove( Range.createIn( doc.graveyard ) );
} );

const batchWithMerge = new Batch();

Expand Down

0 comments on commit 7e515dc

Please sign in to comment.