|
|
@@ -9,6 +9,7 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
|
|
|
import { default as Template, TemplateToBinding, TemplateIfBinding } from '../src/template';
|
|
|
import View from '../src/view';
|
|
|
import ViewCollection from '../src/viewcollection';
|
|
|
+import InputTextView from '../src/inputtext/inputtextview';
|
|
|
import Model from '../src/model';
|
|
|
import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
|
|
|
import EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';
|
|
|
@@ -121,6 +122,23 @@ describe( 'Template', () => {
|
|
|
expect( tpl.attributes.a[ 0 ] ).to.equal( 'foo' );
|
|
|
expect( tpl.children.get( 0 ).tag ).to.equal( 'span' );
|
|
|
} );
|
|
|
+
|
|
|
+ it( 'does not throw when child does not have an "id" property', () => {
|
|
|
+ class DivView extends View {
|
|
|
+ constructor( locale ) {
|
|
|
+ super( locale );
|
|
|
+
|
|
|
+ this.template = new Template( {
|
|
|
+ tag: 'div',
|
|
|
+ children: [
|
|
|
+ new InputTextView( locale )
|
|
|
+ ]
|
|
|
+ } );
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ expect( () => new DivView( {} ) ).to.not.throw( CKEditorError );
|
|
|
+ } );
|
|
|
} );
|
|
|
|
|
|
describe( 'render()', () => {
|