浏览代码

Tests: More resizer tests added.

Marek Lewandowski 6 年之前
父节点
当前提交
fc6249ff01
共有 1 个文件被更改,包括 30 次插入0 次删除
  1. 30 0
      packages/ckeditor5-image/tests/imageresize/resize.js

+ 30 - 0
packages/ckeditor5-image/tests/imageresize/resize.js

@@ -235,6 +235,36 @@ describe.only( 'Image resizer', () => {
 			},
 			resizerPosition: 'bottom-left'
 		} ) );
+
+		it( 'enlarges correctly with right-bottom handler', generateResizeTest( {
+			isSideImage: true,
+			expectedWidth: 120,
+			pointerOffset: {
+				x: 10,
+				y: 10
+			},
+			resizerPosition: 'bottom-right'
+		} ) );
+
+		it( 'enlarges correctly with right-bottom handler, y axis only', generateResizeTest( {
+			isSideImage: true,
+			expectedWidth: 140,
+			pointerOffset: {
+				x: 0,
+				y: 20
+			},
+			resizerPosition: 'bottom-right'
+		} ) );
+
+		it( 'enlarges correctly with right-bottom handler, x axis only', generateResizeTest( {
+			isSideImage: true,
+			expectedWidth: 140,
+			pointerOffset: {
+				x: 40,
+				y: 0
+			},
+			resizerPosition: 'bottom-right'
+		} ) );
 	} );
 
 	function isVisible( element ) {