8
0
Просмотр исходного кода

Merge pull request #18 from ckeditor/t/ckeditor5-engine/306

Refactored model utils.
Piotr Jasiun 9 лет назад
Родитель
Сommit
1aba30e5f2

+ 3 - 3
packages/ckeditor5-basic-styles/tests/boldengine.js

@@ -48,21 +48,21 @@ describe( 'BoldEngine', () => {
 		it( 'should convert <strong> to bold attribute', () => {
 			editor.setData( '<strong>foo</strong>bar' );
 
-			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text bold=true>foo</$text>bar' );
+			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text bold="true">foo</$text>bar' );
 			expect( editor.getData() ).to.equal( '<strong>foo</strong>bar' );
 		} );
 
 		it( 'should convert <b> to bold attribute', () => {
 			editor.setData( '<b>foo</b>bar' );
 
-			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text bold=true>foo</$text>bar' );
+			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text bold="true">foo</$text>bar' );
 			expect( editor.getData() ).to.equal( '<strong>foo</strong>bar' );
 		} );
 
 		it( 'should convert font-weight:bold to bold attribute', () => {
 			editor.setData( '<span style="font-weight: bold;">foo</span>bar' );
 
-			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text bold=true>foo</$text>bar' );
+			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text bold="true">foo</$text>bar' );
 			expect( editor.getData() ).to.equal( '<strong>foo</strong>bar' );
 		} );
 	} );

+ 3 - 3
packages/ckeditor5-basic-styles/tests/italicengine.js

@@ -48,21 +48,21 @@ describe( 'ItalicEngine', () => {
 		it( 'should convert <em> to italic attribute', () => {
 			editor.setData( '<em>foo</em>bar' );
 
-			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text italic=true>foo</$text>bar' );
+			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text italic="true">foo</$text>bar' );
 			expect( editor.getData() ).to.equal( '<em>foo</em>bar' );
 		} );
 
 		it( 'should convert <i> to italic attribute', () => {
 			editor.setData( '<i>foo</i>bar' );
 
-			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text italic=true>foo</$text>bar' );
+			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text italic="true">foo</$text>bar' );
 			expect( editor.getData() ).to.equal( '<em>foo</em>bar' );
 		} );
 
 		it( 'should convert font-weight:italic to italic attribute', () => {
 			editor.setData( '<span style="font-style: italic;">foo</span>bar' );
 
-			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text italic=true>foo</$text>bar' );
+			expect( getModelData( doc, { withoutSelection: true } ) ).to.equal( '<$text italic="true">foo</$text>bar' );
 			expect( editor.getData() ).to.equal( '<em>foo</em>bar' );
 		} );
 	} );