Bladeren bron

Tests: changed test to disconnect it with editor state.

Szymon Cofalik 8 jaren geleden
bovenliggende
commit
57e1dc484c
1 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 3 0
      packages/ckeditor5-heading/tests/heading.js

+ 3 - 0
packages/ckeditor5-heading/tests/heading.js

@@ -150,6 +150,9 @@ describe( 'Heading', () => {
 			it( 'works for the #buttonView', () => {
 				const buttonView = dropdown.buttonView;
 
+				// Setting manually paragraph.value to `false` because there might be some content in editor
+				// after initialisation (for example empty <p></p> inserted when editor is empty).
+				commands.paragraph.value = false;
 				expect( buttonView.label ).to.equal( 'Wybierz nagłówek' );
 				expect( buttonView.tooltip ).to.equal( 'Nagłówek' );