Răsfoiți Sursa

Fix panel visibility on expanded selection test.

Maciej Gołaszewski 6 ani în urmă
părinte
comite
8735288ad5
1 a modificat fișierele cu 8 adăugiri și 4 ștergeri
  1. 8 4
      packages/ckeditor5-mention/tests/mentionui.js

+ 8 - 4
packages/ckeditor5-mention/tests/mentionui.js

@@ -257,11 +257,15 @@ describe( 'MentionUI', () => {
 					writer.insertText( '@', doc.selection.getFirstPosition() );
 				} );
 
-				model.change( () => {
-					model.modifySelection( doc.selection, { direction: 'backward', unit: 'codePoint' } );
-				} );
-
 				return waitForDebounce()
+					.then( () => {
+						expect( panelView.isVisible ).to.be.true;
+
+						model.change( () => {
+							model.modifySelection( doc.selection, { direction: 'backward', unit: 'character' } );
+						} );
+					} )
+					.then( waitForDebounce )
 					.then( () => {
 						expect( panelView.isVisible ).to.be.false;
 					} );