8
0
فهرست منبع

Added test case checking link and focus tracker integration.

Oskar Wróbel 8 سال پیش
والد
کامیت
07012a7376
1فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 11 0
      packages/ckeditor5-link/tests/link.js

+ 11 - 0
packages/ckeditor5-link/tests/link.js

@@ -593,6 +593,17 @@ describe( 'Link', () => {
 			focusEditableSpy = testUtils.sinon.spy( editor.editing.view, 'focus' );
 		} );
 
+		it( 'should mark the editor ui as focused when the #formView is focused', () => {
+			return linkFeature._showPanel()
+				.then( () => {
+					editor.ui.focusTracker.isFocused = false;
+
+					formView.element.dispatchEvent( new Event( 'focus' ) );
+
+					expect( editor.ui.focusTracker.isFocused ).to.true;
+				} );
+		} );
+
 		describe( 'binding', () => {
 			it( 'should bind formView.urlInputView#value to link command value', () => {
 				const command = editor.commands.get( 'link' );