|
|
@@ -92,7 +92,9 @@ describe( 'Heading integration', () => {
|
|
|
|
|
|
describe( 'with the undo feature', () => {
|
|
|
it( 'does not create undo steps when applied to an existing heading (collapsed selection)', () => {
|
|
|
- setModelData( model, '<heading1>foo[]bar</heading1>' );
|
|
|
+ model.enqueueChange( 'transparent', () => {
|
|
|
+ setModelData( model, '<heading1>foo[]bar</heading1>' );
|
|
|
+ } );
|
|
|
|
|
|
editor.execute( 'heading', { value: 'heading1' } );
|
|
|
expect( getModelData( model ) ).to.equal( '<heading1>foo[]bar</heading1>' );
|
|
|
@@ -101,7 +103,9 @@ describe( 'Heading integration', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'does not create undo steps when applied to an existing heading (non–collapsed selection)', () => {
|
|
|
- setModelData( model, '<heading1>[foo</heading1><heading1>bar]</heading1>' );
|
|
|
+ model.enqueueChange( 'transparent', () => {
|
|
|
+ setModelData( model, '<heading1>[foo</heading1><heading1>bar]</heading1>' );
|
|
|
+ } );
|
|
|
|
|
|
editor.execute( 'heading', { value: 'heading1' } );
|
|
|
expect( getModelData( model ) ).to.equal( '<heading1>[foo</heading1><heading1>bar]</heading1>' );
|