Преглед изворни кода

Test: Added manual test for #385 ticket.

Oskar Wróbel пре 7 година
родитељ
комит
111e4b5f71

+ 20 - 0
packages/ckeditor5-ui/tests/manual/tickets/385/1.html

@@ -0,0 +1,20 @@
+<div id="editor">
+	<p>This is a line of text.</p>
+	<p>This is a line of text.</p>
+	<p>This is a line of text.</p>
+	<p>This is a line of text.</p>
+	<figure class="image">
+		<img src="sample.jpg" alt="Sample image">
+	</figure>
+	<p>This is a line of text.</p>
+	<p>This is a line of text.</p>
+	<p>This is a line of text.</p>
+	<p>This is a line of text.</p>
+</div>
+
+<style>
+	.ck-editor {
+		margin: 5em auto;
+		max-width: 70%;
+	}
+</style>

+ 23 - 0
packages/ckeditor5-ui/tests/manual/tickets/385/1.js

@@ -0,0 +1,23 @@
+/**
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* globals window, document, console:false */
+
+import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
+import BalloonToolbar from '../../../../src/toolbar/balloon/balloontoolbar';
+
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		plugins: [ ArticlePluginSet, BalloonToolbar ],
+		toolbar: [ 'bold', 'italic', 'link', 'undo', 'redo' ],
+		balloonToolbar: [ 'bold', 'italic', 'link' ]
+	} )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

+ 13 - 0
packages/ckeditor5-ui/tests/manual/tickets/385/1.md

@@ -0,0 +1,13 @@
+## Incorrect BalloonToolbar position in a case of multi-range selection [#385](https://github.com/ckeditor/ckeditor5-ui/issues/385)
+
+### Use Firefox to this test, check the ticket for the explanation.
+
+1. Make a forward selection that starts in the text before the image and ends in the text after the image
+```
+<p>Line of text</p>
+<p>Line o{f text</p>
+<figure>...</figure>
+<p>Line o}f text</p>
+<p>Line of text</p>
+```
+2. Check if balloon toolbar is attached to the end of the selection

BIN
packages/ckeditor5-ui/tests/manual/tickets/385/sample.jpg