editoruiview.js 816 B

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import EditorUIView from '/ckeditor5/ui/editorui/editoruiview.js';
  6. describe( 'EditorUIView', () => {
  7. let editorUIView;
  8. beforeEach( () => {
  9. editorUIView = new EditorUIView();
  10. return editorUIView.init();
  11. } );
  12. describe( 'constructor', () => {
  13. it( 'creates the body region', () => {
  14. const el = editorUIView.regions.get( 'body' ).element;
  15. expect( el.parentNode ).to.equal( document.body );
  16. expect( el.nextSibling ).to.be.null;
  17. } );
  18. } );
  19. describe( 'destroy', () => {
  20. it( 'removes the body region container', () => {
  21. const el = editorUIView.regions.get( 'body' ).element;
  22. editorUIView.destroy();
  23. expect( el.parentNode ).to.be.null;
  24. } );
  25. } );
  26. } );