8
0
Quellcode durchsuchen

Tests: fixed incorrect schema definition.

Piotrek Koszuliński vor 9 Jahren
Ursprung
Commit
f21fa00f18
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      packages/ckeditor5-link/tests/linkcommand.js

+ 2 - 2
packages/ckeditor5-link/tests/linkcommand.js

@@ -23,6 +23,7 @@ describe( 'LinkCommand', () => {
 				// Allow text with `linkHref` attribute in paragraph.
 				document.schema.registerItem( 'p', '$block' );
 				document.schema.allow( { name: '$text', attributes: 'linkHref', inside: '$root' } );
+				document.schema.allow( { name: '$text', attributes: 'linkHref', inside: 'p' } );
 			} );
 	} );
 
@@ -154,8 +155,7 @@ describe( 'LinkCommand', () => {
 
 			it( 'should set `linkHref` attribute only to allowed elements and omit disallowed', () => {
 				// Disallow text in img.
-				document.schema.registerItem( 'img', '$block' );
-				document.schema.disallow( { name: '$text', attributes: 'linkHref', inside: 'img' } );
+				document.schema.registerItem( 'img', '$inline' );
 
 				setData( document, '<p>f[oo<img></img>ba]r</p>' );