Bladeren bron

Minor improvements.

Oskar Wróbel 6 jaren geleden
bovenliggende
commit
33c922f497
1 gewijzigde bestanden met toevoegingen van 7 en 19 verwijderingen
  1. 7 19
      packages/ckeditor5-heading/tests/title.js

+ 7 - 19
packages/ckeditor5-heading/tests/title.js

@@ -56,8 +56,8 @@ describe( 'Title', () => {
 		expect( model.schema.checkChild( 'title', '$text' ) ).to.equal( false );
 		expect( model.schema.checkChild( 'title', '$block' ) ).to.equal( false );
 		expect( model.schema.checkChild( 'title', 'title-content' ) ).to.equal( true );
-		expect( model.schema.checkChild( '$root', 'title-content' ) ).to.equal( false );
 		expect( model.schema.checkChild( '$root', 'title' ) ).to.equal( true );
+		expect( model.schema.checkChild( '$root', 'title-content' ) ).to.equal( false );
 		expect( model.schema.checkChild( '$block', 'title-content' ) ).to.equal( false );
 		expect( model.schema.checkChild( 'title-content', '$text' ) ).to.equal( true );
 		expect( model.schema.checkChild( 'title-content', '$block' ) ).to.equal( false );
@@ -111,6 +111,12 @@ describe( 'Title', () => {
 			);
 		} );
 
+		it( 'should have a list of title-like elements', () => {
+			expect( Array.from( Title.titleLikeElements ) ).to.have.members( [
+				'paragraph', 'heading1', 'heading2', 'heading3', 'heading4', 'heading5', 'heading6'
+			] );
+		} );
+
 		it( 'should change heading1 element to title when is set as a first root child', () => {
 			setData( model,
 				'<heading1>Foo</heading1>' +
@@ -135,24 +141,6 @@ describe( 'Title', () => {
 			);
 		} );
 
-		it( 'should have list of title-like elements', () => {
-			expect( Array.from( Title.titleLikeElements ) ).to.have.members( [
-				'paragraph', 'heading1', 'heading2', 'heading3', 'heading4', 'heading5', 'heading6'
-			] );
-		} );
-
-		it( 'should change paragraph element to title when is set as a first root child', () => {
-			setData( model,
-				'<paragraph>Foo</paragraph>' +
-				'<paragraph>Bar</paragraph>'
-			);
-
-			expect( getData( model ) ).to.equal(
-				'<title><title-content>[]Foo</title-content></title>' +
-				'<paragraph>Bar</paragraph>'
-			);
-		} );
-
 		it( 'should change title element to a paragraph when is not a first root child #1', () => {
 			setData( model,
 				'<title><title-content>Foo</title-content></title>' +