editorui.js 873 B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. 'use strict';
  6. import Editor from '/ckeditor5/core/editor.js';
  7. import EditorUI from '/ckeditor5/core/editorui/editorui.js';
  8. import ComponentFactory from '/ckeditor5/core/ui/componentfactory.js';
  9. import ControllerCollection from '/ckeditor5/core/ui/controllercollection.js';
  10. describe( 'EditorUI', () => {
  11. let editor, editorUI;
  12. beforeEach( () => {
  13. editor = new Editor();
  14. editorUI = new EditorUI( editor );
  15. } );
  16. describe( 'constructor', () => {
  17. it( 'sets all the properties', () => {
  18. expect( editorUI ).to.have.property( 'editor', editor );
  19. expect( editorUI.featureComponents ).to.be.instanceof( ComponentFactory );
  20. expect( editorUI.collections.get( 'body' ) ).to.be.instanceof( ControllerCollection );
  21. } );
  22. } );
  23. } );