Browse Source

Update manual test for ImageResizeUI.

panr 5 years ago
parent
commit
f8b7e126ef

+ 17 - 1
packages/ckeditor5-image/tests/manual/imageresizeui.js

@@ -7,11 +7,14 @@
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
 import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
-import ImageResize from '../../src/imageresize';
 import Indent from '@ckeditor/ckeditor5-indent/src/indent';
 import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock';
 import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';
 
+import ImageResize from '../../src/imageresize';
+import ImageResizeEditing from '../../src/imageresize/imageresizeediting';
+import ImageResizeUI from '../../src/imageresize/imageresizeui';
+
 import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
 
 const commonConfig = {
@@ -31,6 +34,8 @@ const commonConfig = {
 	cloudServices: CS_CONFIG
 };
 
+// Editor 1
+
 const imageConfig1 = {
 	resizeUnit: '%',
 	resizeOptions: [
@@ -57,6 +62,14 @@ const imageConfig1 = {
 
 const config1 = {
 	...commonConfig,
+	plugins: [
+		ArticlePluginSet,
+		Indent,
+		IndentBlock,
+		EasyImage,
+		ImageResizeEditing,
+		ImageResizeUI
+	],
 	image: imageConfig1
 };
 
@@ -69,6 +82,8 @@ ClassicEditor
 		console.error( err.stack );
 	} );
 
+// Editor 2
+
 const imageConfig2 = {
 	resizeUnit: '%',
 	resizeOptions: [
@@ -96,6 +111,7 @@ const imageConfig2 = {
 		'imageResize:75',
 		'imageResize:original'
 	],
+	disableResizeHandles: true,
 	styles: [
 		'full',
 		'alignLeft',

+ 3 - 0
packages/ckeditor5-image/tests/manual/imageresizeui.md

@@ -1,6 +1,7 @@
 ## Image Resize UI
 
 Tests for manual image resizing using the UI in the image toolbar.
+**NOTE**: Both editors have disabled resize handles. The only way to resize the images is to do it by the UI in the image toolbar.
 
 ## Dropdown
 
@@ -9,6 +10,7 @@ Tests for manual image resizing using the UI in the image toolbar.
 	- The plugin icon should appear only next to the dropdown button.
 	- Each option should have a label text corresponding to an option value defined in the configuration.
 	- The selected option should be "on" when the dropdown is open.
+	- The editor is using the combination of `ImageResizeEditing` and `ImageResizeUI`.
 
 ## Buttons
 
@@ -18,3 +20,4 @@ Tests for manual image resizing using the UI in the image toolbar.
 	- No label should be rendered,
 	- The tooltip text and the `aria-label` attribute should be the same (and more verbose).
 	- The selected option button should be "on".
+	- The editor is using `ImageResize` with the configuration option: `image.disableResizeHandles: true`.