import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyHooks, TinySelections } from '@ephox/wrap-mcagar'; import Editor from 'tinymce/core/api/Editor'; describe('browser.tinymce.models.dom.table.TableNoWidthTest', () => { const hook = TinyHooks.bddSetup({ indent: false, base_url: '/project/tinymce/js/tinymce' }, []); it('TINY-6051: Removing and adding a column doesn\'t add sizes', () => { const editor = hook.editor(); editor.setContent('
Col 1Col 2
'); TinySelections.setCursor(editor, [ 0, 0, 0, 1 ], 0); editor.execCommand('mceTableDeleteCol'); TinyAssertions.assertContent(editor, '
Col 1
'); editor.execCommand('mceTableInsertColAfter'); TinyAssertions.assertContent(editor, '
Col 1 
'); }); it('TINY-6051: Removing and adding a row doesn\'t add sizes', () => { const editor = hook.editor(); editor.setContent('
Row 1
Row 2
'); TinySelections.setCursor(editor, [ 0, 0, 0, 0 ], 0); editor.execCommand('mceTableDeleteRow'); TinyAssertions.assertContent(editor, '
Row 2
'); editor.execCommand('mceTableInsertRowBefore'); TinyAssertions.assertContent(editor, '
 
Row 2
'); }); it('TINY-6051: Merging and splitting a cell doesn\'t add sizes', () => { const editor = hook.editor(); editor.setContent('
12
34
'); TinySelections.setCursor(editor, [ 0, 0, 0, 0 ], 0); editor.execCommand('mceTableMergeCells'); TinyAssertions.assertContent(editor, '
1
3
2
4
'); editor.execCommand('mceTableSplitCells'); TinyAssertions.assertContent(editor, '
1
3
2
 4
'); }); });