8
0
Pārlūkot izejas kodu

Test: Update table cells post fixer tests.

Maciej Gołaszewski 7 gadi atpakaļ
vecāks
revīzija
1db2f5e3a4

+ 4 - 2
packages/ckeditor5-table/tests/_utils/utils.js

@@ -89,7 +89,8 @@ export function viewTable( tableData, attributes = {} ) {
 		cellElement: 'th',
 		rowElement: 'tr',
 		headingElement: 'th',
-		wrappingElement: 'p',
+		wrappingElement: asWidget ? 'span' : 'p',
+		enforceWrapping: asWidget,
 		asWidget
 	} ) }</thead>` : '';
 
@@ -98,7 +99,8 @@ export function viewTable( tableData, attributes = {} ) {
 			cellElement: 'td',
 			rowElement: 'tr',
 			headingElement: 'th',
-			wrappingElement: 'p',
+			wrappingElement: asWidget ? 'span' : 'p',
+			enforceWrapping: asWidget,
 			asWidget
 		} ) }</tbody>` : '';
 

+ 4 - 0
packages/ckeditor5-table/tests/converters/downcast.js

@@ -1152,6 +1152,10 @@ describe( 'downcast converters', () => {
 				[ '00[]' ]
 			] ) );
 
+			expect( formatTable( getViewData( viewDocument, { withoutSelection: true } ) ) ).to.equal( formattedViewTable( [
+				[ '00' ]
+			], { asWidget: true } ) );
+
 			const table = root.getChild( 0 );
 
 			model.change( writer => {