import { ApproxStructure, Assertions } from '@ephox/agar'; import { GuiFactory, TestHelpers } from '@ephox/alloy'; import { describe, it } from '@ephox/bedrock-client'; import { renderTable } from 'tinymce/themes/silver/ui/dialog/Table'; import TestProviders from '../../../module/TestProviders'; describe('headless.tinymce.themes.silver.components.table.TableTest', () => { const hook = TestHelpers.GuiSetup.bddSetup((_store, _doc, _body) => GuiFactory.build( renderTable({ header: [ 'one', 'two', 'three' ], cells: [ [ 'a', 'b', 'c' ], [ 'd', 'e', 'f' ] ] }, TestProviders) )); it('Check basic structure', () => { Assertions.assertStructure( 'Assert table structure', ApproxStructure.fromHtml(( '
| one | ' + 'two | ' + 'three | ' + '
|---|---|---|
| a | ' + 'b | ' + 'c | ' + '
| d | ' + 'e | ' + 'f | ' + '