8
0
Просмотр исходного кода

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

Maciej Gołaszewski 6 лет назад
Родитель
Сommit
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()
 					stopPropagation: sinon.spy()
 				};
 				};
 
 
-				const mentionElementSpy = testUtils.sinon.spy( mentionsView.element, 'scrollTop', [ 'set' ] );
-
 				return waitForDebounce()
 				return waitForDebounce()
 					.then( () => {
 					.then( () => {
 						// The scroll test highly depends on browser styles.
 						// 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...
 						// 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 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 };`;
 						mentionsView.element.style = `min-height:100px;height:100px;max-height:100px;${ reset };`;
 
 
 						// ...and each list view item size to 25px...
 						// ...and each list view item size to 25px...