Selaa lähdekoodia

Tests: More resizer tests added.

Marek Lewandowski 6 vuotta sitten
vanhempi
commit
fc6249ff01
1 muutettua tiedostoa jossa 30 lisäystä ja 0 poistoa
  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 ) {