|
|
@@ -218,6 +218,29 @@ describe( 'MentionUI', () => {
|
|
|
} );
|
|
|
} );
|
|
|
|
|
|
+ it( 'should show panel with no more then 10 items for default static feed', () => {
|
|
|
+ const bigList = {
|
|
|
+ marker: '@',
|
|
|
+ feed: [
|
|
|
+ 'a01', 'a02', 'a03', 'a04', 'a05', 'a06', 'a07', 'a08', 'a09', 'a10', 'a11', 'a12'
|
|
|
+ ]
|
|
|
+ };
|
|
|
+
|
|
|
+ return createClassicTestEditor( { feeds: [ bigList ] } )
|
|
|
+ .then( () => {
|
|
|
+ setData( model, '<paragraph>foo []</paragraph>' );
|
|
|
+
|
|
|
+ model.change( writer => {
|
|
|
+ writer.insertText( '@', doc.selection.getFirstPosition() );
|
|
|
+ } );
|
|
|
+ } )
|
|
|
+ .then( waitForDebounce )
|
|
|
+ .then( () => {
|
|
|
+ expect( panelView.isVisible ).to.be.true;
|
|
|
+ expect( listView.items ).to.have.length( 10 );
|
|
|
+ } );
|
|
|
+ } );
|
|
|
+
|
|
|
describe( 'static list with default trigger', () => {
|
|
|
beforeEach( () => {
|
|
|
return createClassicTestEditor( staticConfig );
|