|
|
@@ -914,6 +914,23 @@ describe( 'MentionUI', () => {
|
|
|
expect( panelView.isVisible ).to.be.false;
|
|
|
} );
|
|
|
} );
|
|
|
+
|
|
|
+ it( 'should focus view after command execution', () => {
|
|
|
+ const focusSpy = testUtils.sinon.spy( editor.editing.view, 'focus' );
|
|
|
+
|
|
|
+ setData( model, '<paragraph>foo []</paragraph>' );
|
|
|
+
|
|
|
+ model.change( writer => {
|
|
|
+ writer.insertText( '@', doc.selection.getFirstPosition() );
|
|
|
+ } );
|
|
|
+
|
|
|
+ return waitForDebounce()
|
|
|
+ .then( () => {
|
|
|
+ listView.items.get( 0 ).children.get( 0 ).fire( 'execute' );
|
|
|
+
|
|
|
+ sinon.assert.calledOnce( focusSpy );
|
|
|
+ } );
|
|
|
+ } );
|
|
|
} );
|
|
|
|
|
|
function createClassicTestEditor( mentionConfig ) {
|