|
5 | 5 |
|
6 | 6 | /* globals document, Event */ |
7 | 7 |
|
8 | | -import ComponentFactory from '@ckeditor/ckeditor5-ui/src/componentfactory'; |
9 | 8 | import View from '@ckeditor/ckeditor5-ui/src/view'; |
10 | 9 |
|
11 | 10 | import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtesteditor'; |
12 | 11 | import DecoupledEditorUI from '../src/decouplededitorui'; |
| 12 | +import EditorUI from '@ckeditor/ckeditor5-core/src/editor/editorui'; |
13 | 13 | import DecoupledEditorUIView from '../src/decouplededitoruiview'; |
14 | 14 |
|
15 | | -import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker'; |
16 | | - |
17 | 15 | import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard'; |
18 | 16 | import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils'; |
19 | 17 | import utils from '@ckeditor/ckeditor5-utils/tests/_utils/utils'; |
@@ -41,20 +39,8 @@ describe( 'DecoupledEditorUI', () => { |
41 | 39 | } ); |
42 | 40 |
|
43 | 41 | describe( 'constructor()', () => { |
44 | | - it( 'sets #editor', () => { |
45 | | - expect( ui.editor ).to.equal( editor ); |
46 | | - } ); |
47 | | - |
48 | | - it( 'sets #view', () => { |
49 | | - expect( ui.view ).to.be.instanceOf( DecoupledEditorUIView ); |
50 | | - } ); |
51 | | - |
52 | | - it( 'creates #componentFactory factory', () => { |
53 | | - expect( ui.componentFactory ).to.be.instanceOf( ComponentFactory ); |
54 | | - } ); |
55 | | - |
56 | | - it( 'creates #focusTracker', () => { |
57 | | - expect( ui.focusTracker ).to.be.instanceOf( FocusTracker ); |
| 42 | + it( 'extends EditorUI', () => { |
| 43 | + expect( ui ).to.instanceof( EditorUI ); |
58 | 44 | } ); |
59 | 45 | } ); |
60 | 46 |
|
@@ -164,18 +150,6 @@ describe( 'DecoupledEditorUI', () => { |
164 | 150 | } ); |
165 | 151 | } ); |
166 | 152 | } ); |
167 | | - |
168 | | - describe( 'destroy()', () => { |
169 | | - it( 'destroys the #view', () => { |
170 | | - const spy = sinon.spy( view, 'destroy' ); |
171 | | - |
172 | | - return editor.destroy() |
173 | | - .then( () => { |
174 | | - sinon.assert.calledOnce( spy ); |
175 | | - sinon.assert.calledWithExactly( spy ); |
176 | | - } ); |
177 | | - } ); |
178 | | - } ); |
179 | 153 | } ); |
180 | 154 |
|
181 | 155 | function viewCreator( name ) { |
|
0 commit comments