Przeglądaj źródła

Add mention to contextual balloon manual test.

Maciej Gołaszewski 6 lat temu
rodzic
commit
f8890b600e

+ 11 - 2
packages/ckeditor5-ui/tests/manual/contextualballoon/contextualballoon.js

@@ -7,6 +7,7 @@
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
 import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
+import Mention from '@ckeditor/ckeditor5-mention/src/mention';
 import BalloonToolbar from '../../../src/toolbar/balloon/balloontoolbar';
 import ContextualBalloon from '../../../src/panel/balloon/contextualballoon';
 import View from '../../../src/view';
@@ -75,9 +76,17 @@ class CustomStackHighlight {
 
 ClassicEditor
 	.create( document.querySelector( '#editor' ), {
-		plugins: [ ArticlePluginSet, BalloonToolbar, CustomStackHighlight ],
+		plugins: [ ArticlePluginSet, BalloonToolbar, CustomStackHighlight, Mention ],
 		toolbar: [ 'bold', 'link' ],
-		balloonToolbar: [ 'bold', 'link' ]
+		balloonToolbar: [ 'bold', 'link' ],
+		mention: {
+			feeds: [
+				{
+					marker: '@',
+					feed: [ '@Barney', '@Lily', '@Marshall', '@Robin', '@Ted' ]
+				}
+			]
+		}
 	} )
 	.then( editor => {
 		window.editor = editor;

+ 6 - 0
packages/ckeditor5-ui/tests/manual/contextualballoon/contextualballoon.md

@@ -17,3 +17,9 @@
 ## Fake panels - max
 
 1. Select text `[select]` (by non-collapsed selection) from the lower highlight. You should see `1 of 4` status of pagination but only 2 additional layers under the balloon should be visible.
+
+## Force single view - Mention
+
+1. Select text `[select]` (by non-collapsed selection).
+2. Type <kbd>space</kbd> + `@` to open mention panel. You should see mention panel with no layers under the balloon and without any counter.
+3. Move selection around `@` when leaving mention suggestions the balloon should be displayed as in above cases (layers, navigation buttons, etc).