|
@@ -43,7 +43,7 @@ describe( 'Transaction', () => {
|
|
|
|
|
|
|
|
describe( 'merge', () => {
|
|
describe( 'merge', () => {
|
|
|
it( 'should merge foo and bar into foobar', () => {
|
|
it( 'should merge foo and bar into foobar', () => {
|
|
|
- doc.makeTransaction().merge( new Position( [ 1 ], root ) );
|
|
|
|
|
|
|
+ doc.createTransaction().merge( new Position( [ 1 ], root ) );
|
|
|
|
|
|
|
|
expect( root.getChildCount() ).to.equal( 1 );
|
|
expect( root.getChildCount() ).to.equal( 1 );
|
|
|
expect( root.getChild( 0 ).name ).to.equal( 'p' );
|
|
expect( root.getChild( 0 ).name ).to.equal( 'p' );
|
|
@@ -60,13 +60,13 @@ describe( 'Transaction', () => {
|
|
|
|
|
|
|
|
it( 'should throw if there is no element after', () => {
|
|
it( 'should throw if there is no element after', () => {
|
|
|
expect( () => {
|
|
expect( () => {
|
|
|
- doc.makeTransaction().merge( new Position( [ 2 ], root ) );
|
|
|
|
|
|
|
+ doc.createTransaction().merge( new Position( [ 2 ], root ) );
|
|
|
} ).to.throw( CKEditorError, /^transaction-merge-no-element-after/ );
|
|
} ).to.throw( CKEditorError, /^transaction-merge-no-element-after/ );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should throw if there is no element before', () => {
|
|
it( 'should throw if there is no element before', () => {
|
|
|
expect( () => {
|
|
expect( () => {
|
|
|
- doc.makeTransaction().merge( new Position( [ 0, 2 ], root ) );
|
|
|
|
|
|
|
+ doc.createTransaction().merge( new Position( [ 0, 2 ], root ) );
|
|
|
} ).to.throw( CKEditorError, /^transaction-merge-no-element-before/ );
|
|
} ).to.throw( CKEditorError, /^transaction-merge-no-element-before/ );
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|