8
0
Maciej Gołaszewski 6 лет назад
Родитель
Сommit
52bb17362a

+ 7 - 7
packages/ckeditor5-engine/tests/view/element.js

@@ -485,12 +485,12 @@ describe( 'Element', () => {
 			it( 'should replace all styles', () => {
 				el._setStyle( 'color', 'red' );
 				el._setStyle( 'top', '10px' );
-				el._setAttribute( 'style', 'border:none' );
+				el._setAttribute( 'style', 'margin-top:2em;' );
 
 				expect( el.hasStyle( 'color' ) ).to.be.false;
 				expect( el.hasStyle( 'top' ) ).to.be.false;
-				expect( el.hasStyle( 'border' ) ).to.be.true;
-				expect( el.getStyle( 'border' ) ).to.equal( 'none' );
+				expect( el.hasStyle( 'margin-top' ) ).to.be.true;
+				expect( el.getStyle( 'margin-top' ) ).to.equal( '2em' );
 			} );
 		} );
 
@@ -794,11 +794,11 @@ describe( 'Element', () => {
 			it( 'should get style', () => {
 				el._setStyle( {
 					color: 'red',
-					border: '1px solid red'
+					'margin-top': '1px'
 				} );
 
 				expect( el.getStyle( 'color' ) ).to.equal( 'red' );
-				expect( el.getStyle( 'border' ) ).to.equal( '1px solid red' );
+				expect( el.getStyle( 'margin-top' ) ).to.equal( '1px' );
 			} );
 		} );
 
@@ -1034,10 +1034,10 @@ describe( 'Element', () => {
 
 		it( 'should return styles in sorted order', () => {
 			const el = new Element( 'foo', {
-				style: 'border: 1px solid red; background-color: red'
+				style: 'margin-top: 2em; background-color: red'
 			} );
 
-			expect( el.getIdentity() ).to.equal( 'foo style="background-color:red;border:1px solid red;"' );
+			expect( el.getIdentity() ).to.equal( 'foo style="background-color:red;margin-top:2em;"' );
 		} );
 
 		it( 'should return attributes in sorted order', () => {

+ 2 - 2
packages/ckeditor5-engine/tests/view/emptyelement.js

@@ -15,7 +15,7 @@ describe( 'EmptyElement', () => {
 		element = new Element( 'b' );
 		emptyElement = new EmptyElement( 'img', {
 			alt: 'alternative text',
-			style: 'border: 1px solid red;color: white;',
+			style: 'margin-top: 2em;color: white;',
 			class: 'image big'
 		} );
 	} );
@@ -88,7 +88,7 @@ describe( 'EmptyElement', () => {
 
 			expect( newEmptyElement.name ).to.equal( 'img' );
 			expect( newEmptyElement.getAttribute( 'alt' ) ).to.equal( 'alternative text' );
-			expect( newEmptyElement.getStyle( 'border' ) ).to.equal( '1px solid red' );
+			expect( newEmptyElement.getStyle( 'margin-top' ) ).to.equal( '2em' );
 			expect( newEmptyElement.getStyle( 'color' ) ).to.equal( 'white' );
 			expect( newEmptyElement.hasClass( 'image' ) ).to.be.true;
 			expect( newEmptyElement.hasClass( 'big' ) ).to.be.true;

+ 3 - 3
packages/ckeditor5-engine/tests/view/uielement.js

@@ -15,7 +15,7 @@ describe( 'UIElement', () => {
 	beforeEach( () => {
 		uiElement = new UIElement( 'span', {
 			foo: 'bar',
-			style: 'border: 1px solid red;color: white;',
+			style: 'margin-top: 2em;color: white;',
 			class: 'foo bar'
 		} );
 	} );
@@ -24,7 +24,7 @@ describe( 'UIElement', () => {
 		it( 'should create instance', () => {
 			expect( uiElement.name ).to.equal( 'span' );
 			expect( uiElement.getAttribute( 'foo' ) ).to.equal( 'bar' );
-			expect( uiElement.getStyle( 'border' ) ).to.equal( '1px solid red' );
+			expect( uiElement.getStyle( 'margin-top' ) ).to.equal( '2em' );
 			expect( uiElement.getStyle( 'color' ) ).to.equal( 'white' );
 			expect( uiElement.hasClass( 'foo' ) ).to.true;
 			expect( uiElement.hasClass( 'bar' ) ).to.true;
@@ -101,7 +101,7 @@ describe( 'UIElement', () => {
 
 			expect( newUIElement.name ).to.equal( 'span' );
 			expect( newUIElement.getAttribute( 'foo' ) ).to.equal( 'bar' );
-			expect( newUIElement.getStyle( 'border' ) ).to.equal( '1px solid red' );
+			expect( newUIElement.getStyle( 'margin-top' ) ).to.equal( '2em' );
 			expect( newUIElement.getStyle( 'color' ) ).to.equal( 'white' );
 			expect( newUIElement.hasClass( 'foo' ) ).to.true;
 			expect( newUIElement.hasClass( 'bar' ) ).to.true;