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

Tests: Extended the locale manual test.

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

+ 4 - 0
packages/ckeditor5-utils/tests/manual/locale/locale.html

@@ -2,23 +2,27 @@
 
 <div id="editor-language">
 	<p>This is an <a href="https://ckeditor.com">editor</a> instance.</p>
+	<figure class="image image-style-side"><img src="./sample.jpg"><figcaption>Caption</figcaption></figure>
 </div>
 
 <h2>language = 'ar' (RTL)</h2>
 
 <div id="editor-language-rtl">
 	<p>مرحبا <a href="https://ckeditor.com">editor</a></p>
+	<figure class="image image-style-side"><img src="./sample.jpg"><figcaption>Caption</figcaption></figure>
 </div>
 
 <h2>language = 'en' (LTR), <br />contentLanguage = 'ar' (RTL)</h2>
 
 <div id="editor-language-rtl-content">
 	<p>مرحبا <a href="https://ckeditor.com">editor</a></p>
+	<figure class="image image-style-side"><img src="./sample.jpg"><figcaption>Caption</figcaption></figure>
 </div>
 
 <h2>language = 'ar' (RTL), <br />contentLanguage = 'en' (LTR)</h2>
 
 <div id="editor-language-rtl-ui">
 	<p>This is an <a href="https://ckeditor.com">editor</a> instance.</p>
+	<figure class="image image-style-side"><img src="./sample.jpg"><figcaption>Caption</figcaption></figure>
 </div>
 

+ 29 - 23
packages/ckeditor5-utils/tests/manual/locale/locale.js

@@ -8,17 +8,32 @@
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
 import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 
-const toolbarConfig = [
-	'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'insertTable', 'mediaEmbed', 'undo', 'redo'
-];
+const config = {
+	plugins: [ ArticlePluginSet ],
+	image: {
+		toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
+	},
+	table: {
+		contentToolbar: [
+			'tableColumn',
+			'tableRow',
+			'mergeTableCells'
+		]
+	},
+	toolbar: [
+		'heading',
+		'|',
+		'bold', 'italic', 'link',
+		'bulletedList', 'numberedList',
+		'blockQuote', 'insertTable', 'mediaEmbed',
+		'undo', 'redo'
+	]
+};
 
 ClassicEditor
-	.create( document.querySelector( '#editor-language' ), {
-		plugins: [ ArticlePluginSet ],
-		toolbar: toolbarConfig,
-
+	.create( document.querySelector( '#editor-language' ), Object.assign( {}, config, {
 		language: 'en'
-	} )
+	} ) )
 	.then( newEditor => {
 		window.editorLanguage = newEditor;
 
@@ -29,12 +44,9 @@ ClassicEditor
 	} );
 
 ClassicEditor
-	.create( document.querySelector( '#editor-language-rtl' ), {
-		plugins: [ ArticlePluginSet ],
-		toolbar: toolbarConfig,
-
+	.create( document.querySelector( '#editor-language-rtl' ), Object.assign( {}, config, {
 		language: 'ar'
-	} )
+	} ) )
 	.then( newEditor => {
 		window.editorLanguageRTL = newEditor;
 
@@ -45,13 +57,10 @@ ClassicEditor
 	} );
 
 ClassicEditor
-	.create( document.querySelector( '#editor-language-rtl-content' ), {
-		plugins: [ ArticlePluginSet ],
-		toolbar: toolbarConfig,
-
+	.create( document.querySelector( '#editor-language-rtl-content' ), Object.assign( {}, config, {
 		language: 'en',
 		contentLanguage: 'ar'
-	} )
+	} ) )
 	.then( newEditor => {
 		window.editorLanguageRTLContent = newEditor;
 
@@ -62,13 +71,10 @@ ClassicEditor
 	} );
 
 ClassicEditor
-	.create( document.querySelector( '#editor-language-rtl-ui' ), {
-		plugins: [ ArticlePluginSet ],
-		toolbar: toolbarConfig,
-
+	.create( document.querySelector( '#editor-language-rtl-ui' ), Object.assign( {}, config, {
 		language: 'ar',
 		contentLanguage: 'en'
-	} )
+	} ) )
 	.then( newEditor => {
 		window.editorLanguageRTLUI = newEditor;
 

BIN
packages/ckeditor5-utils/tests/manual/locale/sample.jpg