浏览代码

Fixed timeouts in contextual toolbar tests to not fail in Edge.

Szymon Kupś 8 年之前
父节点
当前提交
66080ac4ea
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      packages/ckeditor5-ui/tests/toolbar/contextual/contextualtoolbar.js

+ 3 - 2
packages/ckeditor5-ui/tests/toolbar/contextual/contextualtoolbar.js

@@ -44,6 +44,7 @@ describe( 'ContextualToolbar', () => {
 
 				// Focus the engine.
 				editor.editing.view.isFocused = true;
+				editor.editing.view.getDomRoot().focus();
 
 				// Remove all selection ranges from DOM before testing.
 				window.getSelection().removeAllRanges();
@@ -122,12 +123,12 @@ describe( 'ContextualToolbar', () => {
 				// Still not yet.
 				sinon.assert.notCalled( spy );
 
-				// Another 101 ms waiting.
+				// Another waiting.
 				setTimeout( () => {
 					// And here it is.
 					sinon.assert.calledOnce( spy );
 					done();
-				}, 100 );
+				}, 110 );
 			}, 101 );
 		}, 100 );
 	} );