| 290 | } as unknown as ReturnType<typeof getBlock> |
| 291 | |
| 292 | function createTableBlock(canonicalMode: 'basic' | 'advanced'): BlockState { |
| 293 | return { |
| 294 | id: 'table-1', |
| 295 | type: 'table', |
| 296 | name: 'Table 1', |
| 297 | position: { x: 0, y: 0 }, |
| 298 | subBlocks: { |
| 299 | operation: { id: 'operation', type: 'dropdown', value: 'insert_row' }, |
| 300 | tableSelector: { id: 'tableSelector', type: 'table-selector', value: 'tbl_1' }, |
| 301 | manualTableId: { id: 'manualTableId', type: 'short-input', value: 'tbl_1' }, |
| 302 | }, |
| 303 | outputs: {}, |
| 304 | enabled: true, |
| 305 | data: { canonicalModes: { tableId: canonicalMode } }, |
| 306 | } as unknown as BlockState |
| 307 | } |
| 308 | |
| 309 | it('renders one row per canonical pair regardless of basic/advanced mode', () => { |
| 310 | mockGetBlock.mockReturnValue(tableLikeConfig) |