|
@@ -3,7 +3,7 @@
|
|
|
* For licensing, see LICENSE.md.
|
|
* For licensing, see LICENSE.md.
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
-/* globals document */
|
|
|
|
|
|
|
+/* globals document, Event */
|
|
|
/* bender-tags: editor, browser-only */
|
|
/* bender-tags: editor, browser-only */
|
|
|
|
|
|
|
|
import ClassicEditorUI from '/ckeditor5/editor-classic/classiceditorui.js';
|
|
import ClassicEditorUI from '/ckeditor5/editor-classic/classiceditorui.js';
|
|
@@ -45,10 +45,29 @@ describe( 'ClassicEditorUI', () => {
|
|
|
expect( editorUI.toolbar.view ).to.be.instanceof( StickyToolbarView );
|
|
expect( editorUI.toolbar.view ).to.be.instanceof( StickyToolbarView );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
|
|
+ it( 'binds editorUI.toolbar#model to editor.focusTracker', () => {
|
|
|
|
|
+ expect( editorUI.toolbar.model.isActive ).to.false;
|
|
|
|
|
+
|
|
|
|
|
+ editor.focusTracker.isFocused = true;
|
|
|
|
|
+
|
|
|
|
|
+ expect( editorUI.toolbar.model.isActive ).to.true;
|
|
|
|
|
+ } );
|
|
|
|
|
+
|
|
|
it( 'creates editable', () => {
|
|
it( 'creates editable', () => {
|
|
|
expect( editorUI.editable ).to.be.instanceof( EditableUI );
|
|
expect( editorUI.editable ).to.be.instanceof( EditableUI );
|
|
|
expect( editorUI.editable.view ).to.be.instanceof( InlineEditableUIView );
|
|
expect( editorUI.editable.view ).to.be.instanceof( InlineEditableUIView );
|
|
|
} );
|
|
} );
|
|
|
|
|
+
|
|
|
|
|
+ it( 'registers editable element in editor Focus Tracker', () => {
|
|
|
|
|
+ return editorUI.init()
|
|
|
|
|
+ .then( () => {
|
|
|
|
|
+ editor.focusTracker.isFocused = false;
|
|
|
|
|
+
|
|
|
|
|
+ editorUI.editable.view.element.dispatchEvent( new Event( 'focus' ) );
|
|
|
|
|
+
|
|
|
|
|
+ expect( editor.focusTracker.isFocused ).to.true;
|
|
|
|
|
+ } );
|
|
|
|
|
+ } );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
describe( 'editableElement', () => {
|
|
describe( 'editableElement', () => {
|