소스 검색

Tests: Added a manual test for RTL content and indent block.

Aleksander Nowodzinski 6 년 전
부모
커밋
ee536d7966
3개의 변경된 파일83개의 추가작업 그리고 0개의 파일을 삭제
  1. 23 0
      packages/ckeditor5-indent/tests/manual/rtl.html
  2. 50 0
      packages/ckeditor5-indent/tests/manual/rtl.js
  3. 10 0
      packages/ckeditor5-indent/tests/manual/rtl.md

+ 23 - 0
packages/ckeditor5-indent/tests/manual/rtl.html

@@ -0,0 +1,23 @@
+<head>
+	<style>
+		body {
+			max-width: 800px;
+			margin: 20px auto;
+		}
+	</style>
+</head>
+<div id="editor">
+	<h2>Heading 1</h2>
+	<p style="margin-right:1.5em;">Paragraph indented 1.5em</p>
+	<p style="margin-right:30px;">Paragraph indented 30px</p>
+	<p style="margin:0 40px 0 0;">Paragraph indented with margin: 0 40px 0 0</p>
+	<p><strong>Bold</strong> <i>Italic</i> <a href="https://ckeditor.com">Link</a></p>
+	<blockquote>
+		<p>Quote</p>
+		<ul>
+			<li>Quoted UL List item 1</li>
+			<li>Quoted UL List item 2</li>
+		</ul>
+		<p>Quote</p>
+	</blockquote>
+</div>

+ 50 - 0
packages/ckeditor5-indent/tests/manual/rtl.js

@@ -0,0 +1,50 @@
+/**
+ * @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, window, document */
+
+import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
+
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
+
+import Indent from '../../src/indent';
+import IndentBlock from '../../src/indentblock';
+
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		language: 'ar',
+		contentLanguage: 'ar',
+		plugins: [ ArticlePluginSet, Indent, IndentBlock ],
+		toolbar: [
+			'heading',
+			'|',
+			'outdent',
+			'indent',
+			'|',
+			'bulletedList',
+			'numberedList',
+			'|',
+			'blockQuote',
+			'insertTable',
+			'undo',
+			'redo'
+		],
+		image: {
+			toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
+		},
+		table: {
+			contentToolbar: [
+				'tableColumn',
+				'tableRow',
+				'mergeTableCells'
+			]
+		}
+	} )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

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

@@ -0,0 +1,10 @@
+## Indent block with right–to–left content
+
+**Note**: For the best testing, run manual tests adding Arabic to [additional languages configuration](https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/testing-environment.html#running-manual-tests).
+
+---
+
+### Expected
+
+1. All the content in the editor should be aligned to the right.
+1. The indentation should start on the right–side of each block.