boxededitorui.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import Editor from '/ckeditor5/core/editor/editor.js';
  6. import BoxedEditorUI from '/ckeditor5/ui/editorui/boxed/boxededitorui.js';
  7. import ControllerCollection from '/ckeditor5/ui/controllercollection.js';
  8. describe( 'BoxedEditorUI', () => {
  9. let editor, boxedEditorUI;
  10. beforeEach( () => {
  11. editor = new Editor( null, {
  12. ui: {
  13. width: 100,
  14. height: 200
  15. }
  16. } );
  17. boxedEditorUI = new BoxedEditorUI( editor );
  18. } );
  19. describe( 'constructor', () => {
  20. it( 'adds controller collections', () => {
  21. expect( boxedEditorUI.collections.get( 'top' ) ).to.be.instanceof( ControllerCollection );
  22. expect( boxedEditorUI.collections.get( 'main' ) ).to.be.instanceof( ControllerCollection );
  23. } );
  24. it( 'sets "width" and "height" attributes', () => {
  25. expect( boxedEditorUI.width ).to.equal( editor.config.get( 'ui.width' ) );
  26. expect( boxedEditorUI.height ).to.equal( editor.config.get( 'ui.height' ) );
  27. } );
  28. } );
  29. } );