|
|
@@ -47,13 +47,11 @@ describe( 'Text transformation feature - integration', () => {
|
|
|
model.enqueueChange( model.createBatch(), writer => {
|
|
|
writer.setSelection( doc.getRoot().getChild( 0 ), 'end' );
|
|
|
writer.insertText( '(c', doc.selection.focus );
|
|
|
- } );
|
|
|
-
|
|
|
- model.enqueueChange( model.createBatch(), writer => {
|
|
|
writer.setSelection( doc.getRoot().getChild( 0 ), 'end' );
|
|
|
- writer.insertText( ')', doc.selection.focus );
|
|
|
} );
|
|
|
|
|
|
+ editor.execute( 'input', { text: ')' } );
|
|
|
+
|
|
|
expect( editor.getData(), 'inserted text' ).to.equal( '<p>foo©</p>' );
|
|
|
|
|
|
editor.execute( 'undo' );
|
|
|
@@ -71,12 +69,11 @@ describe( 'Text transformation feature - integration', () => {
|
|
|
model.enqueueChange( model.createBatch(), writer => {
|
|
|
writer.setSelection( doc.getRoot().getChild( 0 ), 'end' );
|
|
|
writer.insertText( 'foo bar baz(c', doc.selection.focus );
|
|
|
- } );
|
|
|
-
|
|
|
- model.enqueueChange( model.createBatch(), writer => {
|
|
|
writer.setSelection( doc.getRoot().getChild( 0 ), 'end' );
|
|
|
- writer.insertText( ')', doc.selection.focus );
|
|
|
} );
|
|
|
+
|
|
|
+ editor.execute( 'input', { text: ')' } );
|
|
|
+
|
|
|
expect( editor.getData() ).to.equal( '<p>foo bar baz©</p>' );
|
|
|
|
|
|
editor.execute( 'undo' );
|