浏览代码

Fix "should scroll mention panel to the selected item" tests.

Maciej Gołaszewski 6 年之前
父节点
当前提交
f326b0f4fd
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      packages/ckeditor5-mention/tests/mentionui.js

+ 1 - 2
packages/ckeditor5-mention/tests/mentionui.js

@@ -338,8 +338,6 @@ describe( 'MentionUI', () => {
 					stopPropagation: sinon.spy()
 				};
 
-				const mentionElementSpy = testUtils.sinon.spy( mentionsView.element, 'scrollTop', [ 'set' ] );
-
 				return waitForDebounce()
 					.then( () => {
 						// The scroll test highly depends on browser styles.
@@ -347,6 +345,7 @@ describe( 'MentionUI', () => {
 						// To make this test repeatable across different environments it enforces mentions view size to 100px...
 						const reset = 'padding:0px;margin:0px;border:0 none;line-height: 1em;';
 
+						const mentionElementSpy = testUtils.sinon.spy( mentionsView.element, 'scrollTop', [ 'set' ] );
 						mentionsView.element.style = `min-height:100px;height:100px;max-height:100px;${ reset };`;
 
 						// ...and each list view item size to 25px...