toolbarview.js 785 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* bender-tags: ui, toolbar */
  6. 'use strict';
  7. import ToolbarView from '/ckeditor5/core/ui/toolbar/toolbarview.js';
  8. import Model from '/ckeditor5/core/ui/model.js';
  9. describe( 'ToolbarView', () => {
  10. let model, view;
  11. beforeEach( () => {
  12. model = new Model();
  13. view = new ToolbarView( model );
  14. return view.init();
  15. } );
  16. describe( 'the main element bindings', () => {
  17. it( 'is fine', () => {
  18. expect( view.element.classList.contains( 'ck-toolbar' ) );
  19. } );
  20. } );
  21. describe( 'buttons region', () => {
  22. it( 'is bound to the main element', () => {
  23. expect( view.regions.get( 'buttons' ).element ).to.equal( view.element );
  24. } );
  25. } );
  26. } );