MCPcopy Index your code
hub / github.com/simstudioai/sim / createTableBlock

Function createTableBlock

apps/sim/lib/workflows/autolayout/utils.test.ts:292–307  ·  view source on GitHub ↗
(canonicalMode: 'basic' | 'advanced')

Source from the content-addressed store, hash-verified

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)

Callers 1

utils.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected