8
0

toolbarview.js 830 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import ToolbarView from '../../src/toolbar/toolbarview';
  6. import ViewCollection from '../../src/viewcollection';
  7. describe( 'ToolbarView', () => {
  8. let locale, view;
  9. beforeEach( () => {
  10. locale = {};
  11. view = new ToolbarView( locale );
  12. return view.init();
  13. } );
  14. describe( 'constructor()', () => {
  15. it( 'should set view#locale', () => {
  16. expect( view.locale ).to.equal( locale );
  17. } );
  18. it( 'should create view#children collection', () => {
  19. expect( view.items ).to.be.instanceOf( ViewCollection );
  20. } );
  21. } );
  22. describe( 'template', () => {
  23. it( 'should create element from template', () => {
  24. expect( view.element.classList.contains( 'ck-toolbar' ) ).to.true;
  25. } );
  26. } );
  27. } );