8
0
Просмотр исходного кода

Tests: Added a manual test for RTL UI integration.

Aleksander Nowodzinski 6 лет назад
Родитель
Сommit
ec4e21b1d8

+ 10 - 0
packages/ckeditor5-editor-inline/tests/manual/rtl.html

@@ -0,0 +1,10 @@
+<div id="editor" contenteditable="true">
+	<h2>Editor 1</h2>
+	<p>This is an editor instance.</p>
+</div>
+
+<style>
+	body {
+		height: 10000px;
+	}
+</style>

+ 24 - 0
packages/ckeditor5-editor-inline/tests/manual/rtl.js

@@ -0,0 +1,24 @@
+/**
+ * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
+ */
+
+/* globals console:false, document, window */
+
+import InlineEditor from '../../src/inlineeditor';
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
+
+InlineEditor
+	.create( document.querySelector( '#editor' ), {
+		plugins: [ ArticlePluginSet ],
+		toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],
+		language: 'ar'
+	} )
+	.then( editor => {
+		console.log( 'Editor has been initialized', editor );
+
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

+ 10 - 0
packages/ckeditor5-editor-inline/tests/manual/rtl.md

@@ -0,0 +1,10 @@
+## Inline editor with right–to–left UI
+
+**Note**: For the best testing, run manual tests adding Arabic to [additional languages configuration](https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/development-environment.html#running-tests).
+
+---
+
+### Expected
+
+1. The main editor toolbar should be displayed on the **right** side of editable.
+1. Same as above but also when the viewport is scrolled and the toolbar is attached to the bottom of editable.