Kaynağa Gözat

Simplified the tests after removing throttle from the EditorUI#update event.

Oskar Wróbel 7 yıl önce
ebeveyn
işleme
a7c9e563eb
1 değiştirilmiş dosya ile 0 ekleme ve 15 silme
  1. 0 15
      packages/ckeditor5-link/tests/linkui.js

+ 0 - 15
packages/ckeditor5-link/tests/linkui.js

@@ -288,9 +288,6 @@ describe( 'LinkUI', () => {
 					writer.setSelection( Range.createFromParentsAndOffsets( text, 3, text, 3 ), true );
 				} );
 
-				// "Flush" throttled event.
-				editor.ui.fire( 'update' );
-
 				sinon.assert.calledOnce( spy );
 				sinon.assert.calledWithExactly( spy, {
 					target: view.domConverter.mapViewToDom( linkElement )
@@ -311,9 +308,6 @@ describe( 'LinkUI', () => {
 					writer.setSelection( Range.createFromParentsAndOffsets( text, 3, text, 3 ), true );
 				} );
 
-				// "Flush" throttled event.
-				editor.ui.fire( 'update' );
-
 				sinon.assert.calledOnce( spy );
 				sinon.assert.calledWithExactly( spy, {
 					target: editorElement.ownerDocument.getSelection().getRangeAt( 0 )
@@ -337,9 +331,6 @@ describe( 'LinkUI', () => {
 					writer.setSelection( Range.createFromParentsAndOffsets( text, 1, text, 1 ), true );
 				} );
 
-				// "Flush" throttled event.
-				editor.ui.fire( 'update' );
-
 				sinon.assert.calledOnce( spyHide );
 				sinon.assert.notCalled( spyUpdate );
 			} );
@@ -363,9 +354,6 @@ describe( 'LinkUI', () => {
 					writer.setSelection( Range.createFromParentsAndOffsets( text, 1, text, 2 ), true );
 				} );
 
-				// "Flush" throttled event.
-				editor.ui.fire( 'update' );
-
 				sinon.assert.calledOnce( spyHide );
 				sinon.assert.notCalled( spyUpdate );
 			} );
@@ -387,9 +375,6 @@ describe( 'LinkUI', () => {
 					writer.setSelection( Range.createFromParentsAndOffsets( text, 1, text, 2 ), true );
 				} );
 
-				// "Flush" throttled event.
-				editor.ui.fire( 'update' );
-
 				sinon.assert.calledOnce( spyHide );
 				sinon.assert.notCalled( spyUpdate );
 			} );