Explorar el Código

Tests: Update test to the latest changes in dev-utils API.

Maciej Gołaszewski hace 7 años
padre
commit
3ebb7f174b
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      packages/ckeditor5-heading/tests/integration.js

+ 6 - 2
packages/ckeditor5-heading/tests/integration.js

@@ -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>' );