Răsfoiți Sursa

Tests: Inserting table column at first col-row spanned cell should work properly.

Kuba Niegowski 5 ani în urmă
părinte
comite
170567976f
1 a modificat fișierele cu 18 adăugiri și 0 ștergeri
  1. 18 0
      packages/ckeditor5-table/tests/tableutils.js

+ 18 - 0
packages/ckeditor5-table/tests/tableutils.js

@@ -272,6 +272,24 @@ describe( 'TableUtils', () => {
 			] ) );
 			] ) );
 		} );
 		} );
 
 
+		it( 'should properly insert column at beginning of row-col-spanned cell', () => {
+			setData( model, modelTable( [
+				[ '11', '12', '13' ],
+				[ '21', { colspan: 2, rowspan: 2, contents: '22[]' } ],
+				[ '31' ],
+				[ '41', '42', '43' ]
+			] ) );
+
+			tableUtils.insertColumns( root.getNodeByPath( [ 0 ] ), { at: 1, columns: 1 } );
+
+			assertEqualMarkup( getData( model ), modelTable( [
+				[ '11', '', '12', '13' ],
+				[ '21', '', { colspan: 2, rowspan: 2, contents: '22[]' } ],
+				[ '31', '' ],
+				[ '41', '', '42', '43' ]
+			] ) );
+		} );
+
 		it( 'should update table heading columns attribute when inserting column in headings section', () => {
 		it( 'should update table heading columns attribute when inserting column in headings section', () => {
 			setData( model, modelTable( [
 			setData( model, modelTable( [
 				[ '11[]', '12' ],
 				[ '11[]', '12' ],