Explorar el Código

Aligned tests to changes in "getData()" util. Read more https://github.com/ckeditor/ckeditor5-engine/issues/1179.

Kamil Piechaczek hace 8 años
padre
commit
28c9e3bf5c

+ 6 - 6
packages/ckeditor5-image/tests/image.js

@@ -58,7 +58,7 @@ describe( 'Image', () => {
 			setModelData( document, '[<image alt="alt text" src="foo.png"></image>]' );
 
 			expect( getViewData( viewDocument ) ).to.equal(
-				'[<figure class="image ck-widget ck-widget_selected" contenteditable="false">' +
+				'[<figure class="ck-widget ck-widget_selected image" contenteditable="false">' +
 					'<img alt="alt text" src="foo.png"></img>' +
 				'</figure>]'
 			);
@@ -71,7 +71,7 @@ describe( 'Image', () => {
 			setModelData( document, '[<image src="foo.png" alt=""></image>]' );
 
 			expect( getViewData( viewDocument ) ).to.equal(
-				'[<figure class="image ck-widget ck-widget_selected" contenteditable="false">' +
+				'[<figure class="ck-widget ck-widget_selected image" contenteditable="false">' +
 				'<img alt="" src="foo.png"></img>' +
 				'</figure>]'
 			);
@@ -87,10 +87,10 @@ describe( 'Image', () => {
 			);
 
 			expect( getViewData( viewDocument ) ).to.equal(
-				'[<figure class="image ck-widget ck-widget_selected" contenteditable="false">' +
+				'[<figure class="ck-widget ck-widget_selected image" contenteditable="false">' +
 				'<img alt="alt text" src="foo.png"></img>' +
 				'</figure>]' +
-				'<figure class="image ck-widget" contenteditable="false">' +
+				'<figure class="ck-widget image" contenteditable="false">' +
 				'<img alt="alt text" src="foo.png"></img>' +
 				'</figure>'
 			);
@@ -101,10 +101,10 @@ describe( 'Image', () => {
 			} );
 
 			expect( getViewData( viewDocument ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false">' +
+				'<figure class="ck-widget image" contenteditable="false">' +
 				'<img alt="alt text" src="foo.png"></img>' +
 				'</figure>' +
-				'[<figure class="image ck-widget ck-widget_selected" contenteditable="false">' +
+				'[<figure class="ck-widget ck-widget_selected image" contenteditable="false">' +
 				'<img alt="alt text" src="foo.png"></img>' +
 				'</figure>]'
 			);

+ 4 - 4
packages/ckeditor5-image/tests/image/converters.js

@@ -142,7 +142,7 @@ describe( 'Image converters', () => {
 			} );
 
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false"><img alt="foo bar" src=""></img></figure>'
+				'<figure class="ck-widget image" contenteditable="false"><img alt="foo bar" src=""></img></figure>'
 			);
 		} );
 
@@ -157,7 +157,7 @@ describe( 'Image converters', () => {
 			} );
 
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false"><img src=""></img></figure>'
+				'<figure class="ck-widget image" contenteditable="false"><img src=""></img></figure>'
 			);
 		} );
 
@@ -172,7 +172,7 @@ describe( 'Image converters', () => {
 			} );
 
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false"><img alt="baz quix" src=""></img></figure>'
+				'<figure class="ck-widget image" contenteditable="false"><img alt="baz quix" src=""></img></figure>'
 			);
 		} );
 
@@ -191,7 +191,7 @@ describe( 'Image converters', () => {
 			} );
 
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false"><img alt="foo bar" src=""></img></figure>'
+				'<figure class="ck-widget image" contenteditable="false"><img alt="foo bar" src=""></img></figure>'
 			);
 		} );
 	} );

+ 10 - 10
packages/ckeditor5-image/tests/image/imageengine.js

@@ -400,7 +400,7 @@ describe( 'ImageEngine', () => {
 				setModelData( document, '<image src="foo.png" alt="alt text"></image>' );
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-					'<figure class="image ck-widget" contenteditable="false"><img alt="alt text" src="foo.png"></img></figure>'
+					'<figure class="ck-widget image" contenteditable="false"><img alt="alt text" src="foo.png"></img></figure>'
 				);
 			} );
 
@@ -423,7 +423,7 @@ describe( 'ImageEngine', () => {
 				} );
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-					'<figure class="image ck-widget" contenteditable="false"><img alt="new text" src="foo.png"></img></figure>'
+					'<figure class="ck-widget image" contenteditable="false"><img alt="new text" src="foo.png"></img></figure>'
 				);
 			} );
 
@@ -438,7 +438,7 @@ describe( 'ImageEngine', () => {
 				} );
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) )
-					.to.equal( '<figure class="image ck-widget" contenteditable="false"><img src="foo.png"></img></figure>' );
+					.to.equal( '<figure class="ck-widget image" contenteditable="false"><img src="foo.png"></img></figure>' );
 			} );
 
 			it( 'should not convert change if is already consumed', () => {
@@ -456,7 +456,7 @@ describe( 'ImageEngine', () => {
 				} );
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-					'<figure class="image ck-widget" contenteditable="false"><img alt="alt text" src="foo.png"></img></figure>'
+					'<figure class="ck-widget image" contenteditable="false"><img alt="alt text" src="foo.png"></img></figure>'
 				);
 			} );
 
@@ -469,7 +469,7 @@ describe( 'ImageEngine', () => {
 					'</image>' );
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img alt="alt text" sizes="100vw" src="foo.png" srcset="small.png 148w, big.png 1024w"></img>' +
 					'</figure>'
 				);
@@ -491,7 +491,7 @@ describe( 'ImageEngine', () => {
 				} );
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img alt="alt text" src="foo.png"></img>' +
 					'</figure>'
 				);
@@ -506,7 +506,7 @@ describe( 'ImageEngine', () => {
 					'</image>' );
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img alt="alt text" sizes="100vw" src="foo.png" srcset="small.png 148w, big.png 1024w" width="1024"></img>' +
 					'</figure>'
 				);
@@ -523,7 +523,7 @@ describe( 'ImageEngine', () => {
 				} );
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img src="foo.png"></img>' +
 					'</figure>'
 				);
@@ -545,7 +545,7 @@ describe( 'ImageEngine', () => {
 				} );
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 					'<img src="foo.png"></img>' +
 					'</figure>'
 				);
@@ -569,7 +569,7 @@ describe( 'ImageEngine', () => {
 				);
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img alt="alt text" src="foo.png"></img>' +
 					'</figure>'
 				);

+ 26 - 26
packages/ckeditor5-image/tests/imagecaption/imagecaptionengine.js

@@ -116,7 +116,7 @@ describe( 'ImageCaptionEngine', () => {
 				setModelData( doc, '<image src="img.png"><caption>Foo bar baz.</caption></image>' );
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img src="img.png"></img>' +
 						'<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
 							'Foo bar baz.' +
@@ -130,9 +130,9 @@ describe( 'ImageCaptionEngine', () => {
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
 					'<p>foo</p>' +
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img src="img.png"></img>' +
-						'<figcaption class="ck-placeholder ck-editable ck-hidden" ' +
+						'<figcaption class="ck-editable ck-hidden ck-placeholder" ' +
 							'contenteditable="true" data-placeholder="Enter image caption">' +
 						'</figcaption>' +
 					'</figure>'
@@ -163,7 +163,7 @@ describe( 'ImageCaptionEngine', () => {
 				setModelData( doc, '<image src="img.png"><caption>Foo bar baz.</caption></image>' );
 
 				expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-					'<figure class="image ck-widget" contenteditable="false"><img src="img.png"></img><span></span>Foo bar baz.</figure>'
+					'<figure class="ck-widget image" contenteditable="false"><img src="img.png"></img><span></span>Foo bar baz.</figure>'
 				);
 			} );
 
@@ -180,7 +180,7 @@ describe( 'ImageCaptionEngine', () => {
 
 				expect( getViewData( viewDocument ) ).to.equal(
 					'<p>{}foo</p>' +
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img src="img.png"></img>' +
 						'<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
 							'foo bar' +
@@ -202,7 +202,7 @@ describe( 'ImageCaptionEngine', () => {
 
 				expect( getViewData( viewDocument ) ).to.equal(
 					'<p>{}foo</p>' +
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img src="img.png"></img>' +
 						'<figcaption class="ck-editable ck-hidden ck-placeholder" ' +
 							'contenteditable="true" data-placeholder="Enter image caption">' +
@@ -224,7 +224,7 @@ describe( 'ImageCaptionEngine', () => {
 
 				expect( getViewData( viewDocument ) ).to.equal(
 					'<p>{}foo</p>' +
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img src="img.png"></img>' +
 						'<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">baz</figcaption>' +
 					'</figure>'
@@ -247,9 +247,9 @@ describe( 'ImageCaptionEngine', () => {
 			);
 
 			expect( getViewData( viewDocument ) ).to.equal(
-				'[<figure class="image ck-widget" contenteditable="false">' +
+				'[<figure class="ck-widget image" contenteditable="false">' +
 					'<img alt="" src=""></img>' +
-					'<figcaption class="ck-placeholder ck-editable" ' +
+					'<figcaption class="ck-editable ck-placeholder" ' +
 						'contenteditable="true" data-placeholder="Enter image caption">' +
 					'</figcaption>' +
 				'</figure>]' +
@@ -271,7 +271,7 @@ describe( 'ImageCaptionEngine', () => {
 			);
 
 			expect( getViewData( viewDocument ) ).to.equal(
-				'[<figure class="image ck-widget" contenteditable="false">' +
+				'[<figure class="ck-widget image" contenteditable="false">' +
 					'<img alt="" src=""></img>' +
 					'<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
 						'foo bar' +
@@ -300,9 +300,9 @@ describe( 'ImageCaptionEngine', () => {
 			);
 
 			expect( getViewData( viewDocument ) ).to.equal(
-				'[<figure class="image ck-widget" contenteditable="false">' +
+				'[<figure class="ck-widget image" contenteditable="false">' +
 					'<img alt="" src=""></img>' +
-					'<figcaption class="ck-placeholder ck-editable" ' +
+					'<figcaption class="ck-editable ck-placeholder" ' +
 						'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
 				'</figure>]' +
 				'<p></p>'
@@ -331,9 +331,9 @@ describe( 'ImageCaptionEngine', () => {
 
 			expect( getViewData( viewDocument ) ).to.equal(
 				'<p>foo</p>' +
-				'[<figure class="image ck-widget" contenteditable="false">' +
+				'[<figure class="ck-widget image" contenteditable="false">' +
 					'<img src=""></img>' +
-					'<figcaption class="ck-placeholder ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
+					'<figcaption class="ck-editable ck-placeholder" contenteditable="true" data-placeholder="Enter image caption">' +
 					'</figcaption>' +
 				'</figure>]'
 			);
@@ -344,9 +344,9 @@ describe( 'ImageCaptionEngine', () => {
 
 			expect( getViewData( viewDocument ) ).to.equal(
 				'<p>{}foo</p>' +
-				'<figure class="image ck-widget" contenteditable="false">' +
+				'<figure class="ck-widget image" contenteditable="false">' +
 					'<img src=""></img>' +
-					'<figcaption class="ck-placeholder ck-editable ck-hidden" ' +
+					'<figcaption class="ck-editable ck-hidden ck-placeholder" ' +
 						'contenteditable="true" data-placeholder="Enter image caption">' +
 					'</figcaption>' +
 				'</figure>'
@@ -358,7 +358,7 @@ describe( 'ImageCaptionEngine', () => {
 
 			expect( getViewData( viewDocument ) ).to.equal(
 				'<p>foo</p>' +
-				'[<figure class="image ck-widget" contenteditable="false">' +
+				'[<figure class="ck-widget image" contenteditable="false">' +
 					'<img src=""></img>' +
 					'<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">foo bar</figcaption>' +
 				'</figure>]'
@@ -374,9 +374,9 @@ describe( 'ImageCaptionEngine', () => {
 
 			expect( getViewData( viewDocument ) ).to.equal(
 				'<p>{}foo</p>' +
-				'<figure class="image ck-widget" contenteditable="false">' +
+				'<figure class="ck-widget image" contenteditable="false">' +
 					'<img src=""></img>' +
-					'<figcaption class="ck-placeholder ck-editable ck-hidden" ' +
+					'<figcaption class="ck-editable ck-hidden ck-placeholder" ' +
 						'contenteditable="true" data-placeholder="Enter image caption">' +
 					'</figcaption>' +
 				'</figure>'
@@ -391,7 +391,7 @@ describe( 'ImageCaptionEngine', () => {
 			} );
 
 			expect( getViewData( viewDocument ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false">' +
+				'<figure class="ck-widget image" contenteditable="false">' +
 					'<img src=""></img>' +
 					'<figcaption class="ck-editable ck-placeholder" contenteditable="true" data-placeholder="Enter image caption">' +
 						'[]' +
@@ -410,7 +410,7 @@ describe( 'ImageCaptionEngine', () => {
 			} );
 
 			expect( getViewData( viewDocument ) ).to.equal(
-				'[<figure class="image ck-widget" contenteditable="false">' +
+				'[<figure class="ck-widget image" contenteditable="false">' +
 					'<img src=""></img>' +
 					'<figcaption class="ck-editable ck-placeholder" ' +
 						'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
@@ -427,13 +427,13 @@ describe( 'ImageCaptionEngine', () => {
 			} );
 
 			expect( getViewData( viewDocument ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false">' +
+				'<figure class="ck-widget image" contenteditable="false">' +
 					'<img src=""></img>' +
 					'<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">foo bar</figcaption>' +
 				'</figure>' +
-				'[<figure class="image ck-widget" contenteditable="false">' +
+				'[<figure class="ck-widget image" contenteditable="false">' +
 					'<img src=""></img>' +
-					'<figcaption class="ck-placeholder ck-editable" ' +
+					'<figcaption class="ck-editable ck-placeholder" ' +
 						'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
 				'</figure>]'
 			);
@@ -458,7 +458,7 @@ describe( 'ImageCaptionEngine', () => {
 				// Check if there is no figcaption in the view.
 				expect( getViewData( viewDocument ) ).to.equal(
 					'<p>{}foo</p>' +
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img src=""></img>' +
 						'<figcaption class="ck-editable ck-hidden ck-placeholder" ' +
 							'contenteditable="true" data-placeholder="Enter image caption">' +
@@ -471,7 +471,7 @@ describe( 'ImageCaptionEngine', () => {
 				// Check if figcaption is back with contents.
 				expect( getViewData( viewDocument ) ).to.equal(
 					'<p>foo</p>' +
-					'<figure class="image ck-widget" contenteditable="false">' +
+					'<figure class="ck-widget image" contenteditable="false">' +
 						'<img src=""></img>' +
 						'<figcaption class="ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
 							'{foo bar baz}' +

+ 13 - 13
packages/ckeditor5-image/tests/imagestyle/imagestyleengine.js

@@ -94,7 +94,7 @@ describe( 'ImageStyleEngine', () => {
 			expect( getModelData( document, { withoutSelection: true } ) )
 				.to.equal( '<image imageStyle="sideStyle" src="foo.png"></image>' );
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget side-class" contenteditable="false">' +
+				'<figure class="ck-widget image side-class" contenteditable="false">' +
 					'<img src="foo.png"></img>' +
 				'</figure>' );
 		} );
@@ -104,7 +104,7 @@ describe( 'ImageStyleEngine', () => {
 
 			expect( getModelData( document, { withoutSelection: true } ) ).to.equal( '<image src="foo.png"></image>' );
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget image" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 		} );
 
@@ -121,7 +121,7 @@ describe( 'ImageStyleEngine', () => {
 
 			expect( getModelData( document, { withoutSelection: true } ) ).to.equal( '<image src="foo.png"></image>' );
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget image" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 		} );
 
@@ -136,7 +136,7 @@ describe( 'ImageStyleEngine', () => {
 
 			expect( editor.getData() ).to.equal( '<figure class="image side-class"><img src="foo.png"></figure>' );
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget side-class" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget image side-class" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 		} );
 
@@ -151,7 +151,7 @@ describe( 'ImageStyleEngine', () => {
 
 			expect( editor.getData() ).to.equal( '<figure class="image"><img src="foo.png"></figure>' );
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget image" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 		} );
 
@@ -168,7 +168,7 @@ describe( 'ImageStyleEngine', () => {
 
 			// https://github.com/ckeditor/ckeditor5-image/issues/132
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget side-class" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget image side-class" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 
 			document.enqueueChanges( () => {
@@ -179,7 +179,7 @@ describe( 'ImageStyleEngine', () => {
 
 			// https://github.com/ckeditor/ckeditor5-image/issues/132
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget dummy-class" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget dummy-class image" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 		} );
 
@@ -197,7 +197,7 @@ describe( 'ImageStyleEngine', () => {
 			} );
 
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget image" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 		} );
 
@@ -215,7 +215,7 @@ describe( 'ImageStyleEngine', () => {
 			} );
 
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget side-class" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget image side-class" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 		} );
 
@@ -233,7 +233,7 @@ describe( 'ImageStyleEngine', () => {
 			} );
 
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget dummy-class" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget dummy-class image" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 		} );
 
@@ -248,7 +248,7 @@ describe( 'ImageStyleEngine', () => {
 
 			expect( editor.getData() ).to.equal( '<figure class="image"><img src="foo.png"></figure>' );
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget image" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 		} );
 
@@ -263,7 +263,7 @@ describe( 'ImageStyleEngine', () => {
 
 			expect( editor.getData() ).to.equal( '<figure class="image"><img src="foo.png"></figure>' );
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget image" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 		} );
 
@@ -278,7 +278,7 @@ describe( 'ImageStyleEngine', () => {
 
 			expect( editor.getData() ).to.equal( '<figure class="image"><img src="foo.png"></figure>' );
 			expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
-				'<figure class="image ck-widget" contenteditable="false"><img src="foo.png"></img></figure>'
+				'<figure class="ck-widget image" contenteditable="false"><img src="foo.png"></img></figure>'
 			);
 		} );
 	} );