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

Add tests for TAB handling in table when target cell contains an image.

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

+ 14 - 0
packages/ckeditor5-table/tests/tableediting.js

@@ -312,6 +312,20 @@ describe( 'TableEditing', () => {
 				] ) );
 			} );
 
+			it( 'should move to next cell with an image', () => {
+				setModelData( model, modelTable( [
+					[ '11[]', '<paragraph>foo</paragraph><image></image>' ]
+				] ) );
+
+				editor.editing.view.document.fire( 'keydown', domEvtDataStub );
+
+				sinon.assert.calledOnce( domEvtDataStub.preventDefault );
+				sinon.assert.calledOnce( domEvtDataStub.stopPropagation );
+				expect( formatTable( getModelData( model ) ) ).to.equal( formattedModelTable( [
+					[ '11', '[<paragraph></paragraph><image></image>]' ]
+				] ) );
+			} );
+
 			it( 'should listen with lower priority then its children', () => {
 				// Cancel TAB event.
 				editor.keystrokes.set( 'Tab', ( data, cancel ) => cancel() );