This repository was archived by the owner on Jun 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -374,7 +374,9 @@ export default class MentionUI extends Plugin {
374374 this . _balloon . add ( {
375375 view : this . _mentionsView ,
376376 position : this . _getBalloonPanelPositionData ( markerMarker , this . _mentionsView . position ) ,
377- withArrow : false
377+ withArrow : false ,
378+ singleViewMode : true ,
379+ stack : 'mention'
378380 } ) ;
379381 }
380382
Original file line number Diff line number Diff line change @@ -96,10 +96,15 @@ describe( 'MentionUI', () => {
9696 } ) ;
9797
9898 describe ( 'contextual balloon' , ( ) => {
99+ let balloonAddSpy ;
100+
99101 beforeEach ( ( ) => {
100102 return createClassicTestEditor ( staticConfig )
101103 . then ( ( ) => {
102104 setData ( model , '<paragraph>foo []</paragraph>' ) ;
105+ const contextualBalloon = editor . plugins . get ( ContextualBalloon ) ;
106+
107+ balloonAddSpy = sinon . spy ( contextualBalloon , 'add' ) ;
103108
104109 model . change ( writer => {
105110 writer . insertText ( '@' , doc . selection . getFirstPosition ( ) ) ;
@@ -109,6 +114,9 @@ describe( 'MentionUI', () => {
109114 } ) ;
110115
111116 it ( 'should disable arrow' , ( ) => {
117+ sinon . assert . calledOnce ( balloonAddSpy ) ;
118+ sinon . assert . calledWithExactly ( balloonAddSpy , sinon . match ( data => data . singleViewMode ) ) ;
119+ sinon . assert . calledWithExactly ( balloonAddSpy , sinon . match ( data => data . stack == 'mention' ) ) ;
112120 expect ( panelView . isVisible ) . to . be . true ;
113121 expect ( panelView . withArrow ) . to . be . false ;
114122 } ) ;
You can’t perform that action at this time.
0 commit comments