瀏覽代碼

Tests: Ported percentage widget resize tests.

Marek Lewandowski 5 年之前
父節點
當前提交
0d306cf1cb
共有 1 個文件被更改,包括 0 次插入70 次删除
  1. 0 70
      packages/ckeditor5-image/tests/imageresize.js

+ 0 - 70
packages/ckeditor5-image/tests/imageresize.js

@@ -230,76 +230,6 @@ describe( 'ImageResize', () => {
 		} );
 	} );
 
-	describe( 'percent resizing', () => {
-		beforeEach( () => createEditor( {
-			plugins: [ Image, ImageStyle, Paragraph, Undo, Table, ImageResize ]
-		} ) );
-
-		describe( 'standard image', () => {
-			beforeEach( () => {
-				setData( editor.model, `<paragraph>foo</paragraph>[<image src="${ IMAGE_SRC_FIXTURE }"></image>]` );
-
-				widget = viewDocument.getRoot().getChild( 1 );
-			} );
-
-			it( 'shrinks correctly with left-bottom handler', generateResizeTest( {
-				expectedWidth: 16,
-				modelRegExp: /<paragraph>foo<\/paragraph><image src=".+?" width="([\d]{2}(?:\.[\d]{1,2}))%"><\/image>/,
-				pointerOffset: {
-					x: 10,
-					y: -10
-				},
-				resizerPosition: 'bottom-left'
-			} ) );
-
-			it( 'enlarges correctly with right-bottom handler', generateResizeTest( {
-				expectedWidth: 22,
-				modelRegExp: /<paragraph>foo<\/paragraph><image src=".+?" width="([\d]{2}(?:\.[\d]{1,2}))%"><\/image>/,
-				pointerOffset: {
-					x: 0,
-					y: 5
-				},
-				resizerPosition: 'bottom-right'
-			} ) );
-
-			it( 'enlarges correctly an image with unsupported width unit', async () => {
-				setData( editor.model, `<paragraph>foo</paragraph>[<image src="${ IMAGE_SRC_FIXTURE }" width="50pt"></image>]` );
-
-				widget = viewDocument.getRoot().getChild( 1 );
-
-				await generateResizeTest( {
-					expectedWidth: 15,
-					modelRegExp: /<paragraph>foo<\/paragraph><image src=".+?" width="([\d]{2}(?:\.[\d]{1,2}))%"><\/image>/,
-					pointerOffset: {
-						x: 0,
-						y: 5
-					},
-					resizerPosition: 'bottom-right'
-				} )();
-			} );
-		} );
-
-		describe( 'side image', () => {
-			beforeEach( () => {
-				setData( editor.model, `<paragraph>foo</paragraph>[<image imageStyle="side" src="${ IMAGE_SRC_FIXTURE }"></image>]` );
-
-				view = editor.editing.view;
-				viewDocument = view.document;
-				widget = viewDocument.getRoot().getChild( 1 );
-			} );
-
-			it( 'shrinks correctly with left-bottom handler', generateResizeTest( {
-				expectedWidth: 18,
-				modelRegExp: /<paragraph>foo<\/paragraph><image imageStyle="side" src=".+?" width="([\d]{2}(?:\.[\d]{1,2}))%"><\/image>/,
-				pointerOffset: {
-					x: 10,
-					y: -10
-				},
-				resizerPosition: 'bottom-left'
-			} ) );
-		} );
-	} );
-
 	describe( 'undo integration', () => {
 		beforeEach( () => createEditor() );