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

Add a test case for selecting all types of cells.

Maciej Gołaszewski 5 лет назад
Родитель
Сommit
7607201f77
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      packages/ckeditor5-table/tests/commands/mergecellscommand.js

+ 14 - 0
packages/ckeditor5-table/tests/commands/mergecellscommand.js

@@ -293,6 +293,20 @@ describe( 'MergeCellsCommand', () => {
 
 			expect( command.isEnabled ).to.be.false;
 		} );
+
+		it( 'should be false if selection has cells from column headers, row headers and body sections', () => {
+			setData( model, modelTable( [
+				[ '00[]', '01', '02', '03' ],
+				[ '10', '11', '12', '13' ]
+			], { headingColumns: 2, headingRows: 1 } ) );
+
+			tableSelection._setCellSelection(
+				root.getNodeByPath( [ 0, 0, 0 ] ),
+				root.getNodeByPath( [ 0, 1, 2 ] )
+			);
+
+			expect( command.isEnabled ).to.be.false;
+		} );
 	} );
 
 	describe( 'execute()', () => {