editorui.js 961 B

12345678910111213141516171819202122232425262728293031323334
  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/editor.js';
  7. import EditorUI from '/ckeditor5/ui/editorui/editorui.js';
  8. import ComponentFactory from '/ckeditor5/ui/componentfactory.js';
  9. import ControllerCollection from '/ckeditor5/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. it( 'sets editor.ui property', () => {
  23. expect( editor ).to.have.property( 'ui', editorUI );
  24. } );
  25. } );
  26. } );