Selaa lähdekoodia

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

Maciej Gołaszewski 7 vuotta sitten
vanhempi
commit
3ebb7f174b
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  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>' );