import React from 'react'; import { composeStories } from '@storybook/react-vite'; import { render as testRender } from '../../../../vitest/render'; import * as stories from './TableCell.stories'; const composedStories = composeStories(stories); describe('TableCell Story Snapshots', () => { it('has tests for all stories', () => { const storyNames = Object.keys(composedStories); const testedStories = new Set(['Default', 'StickyStart']); const untestedStories = storyNames.filter(name => !testedStories.has(name)); expect(untestedStories).toEqual([]); }); it('renders Default story', () => { const Story = composedStories.Default; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
Header cell 1 Header cell 2 Header cell 3 Header cell 4
Row 1, body cell 1 Row 1, body cell 2 Row 1, body cell 3 Row 1, body cell 4
Row 2, body cell 1 Row 2, body cell 2 Row 2, body cell 3 Row 2, body cell 4
Row 3, body cell 1 Row 3, body cell 2 Row 3, body cell 3 Row 3, body cell 4
Row 4, body cell 1 Row 4, body cell 2 Row 4, body cell 3 Row 4, body cell 4
`); }); it('renders StickyStart story', () => { const Story = composedStories.StickyStart; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
Header cell 1 Header cell 2 Header cell 3 Header cell 4 Header cell 5 Header cell 6 Header cell 7 Header cell 8 Header cell 9 Header cell 10 Header cell 11 Header cell 12 Header cell 13 Header cell 14 Header cell 15 Header cell 16 Header cell 17 Header cell 18 Header cell 19 Header cell 20 Header cell 21 Header cell 22 Header cell 23 Header cell 24 Header cell 25 Header cell 26 Header cell 27 Header cell 28 Header cell 29 Header cell 30 Header cell 31 Header cell 32 Header cell 33 Header cell 34 Header cell 35 Header cell 36 Header cell 37 Header cell 38 Header cell 39 Header cell 40 Header cell 41 Header cell 42 Header cell 43 Header cell 44 Header cell 45 Header cell 46 Header cell 47 Header cell 48
Sticky start header cell Row 1, body cell 2 Row 1, body cell 3 Row 1, body cell 4 Row 1, body cell 5 Row 1, body cell 6 Row 1, body cell 7 Row 1, body cell 8 Row 1, body cell 9 Row 1, body cell 10 Row 1, body cell 11 Row 1, body cell 12 Row 1, body cell 13 Row 1, body cell 14 Row 1, body cell 15 Row 1, body cell 16 Row 1, body cell 17 Row 1, body cell 18 Row 1, body cell 19 Row 1, body cell 20 Row 1, body cell 21 Row 1, body cell 22 Row 1, body cell 23 Row 1, body cell 24 Row 1, body cell 25 Row 1, body cell 26 Row 1, body cell 27 Row 1, body cell 28 Row 1, body cell 29 Row 1, body cell 30 Row 1, body cell 31 Row 1, body cell 32 Row 1, body cell 33 Row 1, body cell 34 Row 1, body cell 35 Row 1, body cell 36 Row 1, body cell 37 Row 1, body cell 38 Row 1, body cell 39 Row 1, body cell 40 Row 1, body cell 41 Row 1, body cell 42 Row 1, body cell 43 Row 1, body cell 44 Row 1, body cell 45 Row 1, body cell 46 Row 1, body cell 47 Row 1, body cell 48
Row 2, body cell 1 Row 2, body cell 2 Row 2, body cell 3 Row 2, body cell 4 Row 2, body cell 5 Row 2, body cell 6 Row 2, body cell 7 Row 2, body cell 8 Row 2, body cell 9 Row 2, body cell 10 Row 2, body cell 11 Row 2, body cell 12 Row 2, body cell 13 Row 2, body cell 14 Row 2, body cell 15 Row 2, body cell 16 Row 2, body cell 17 Row 2, body cell 18 Row 2, body cell 19 Row 2, body cell 20 Row 2, body cell 21 Row 2, body cell 22 Row 2, body cell 23 Row 2, body cell 24 Row 2, body cell 25 Row 2, body cell 26 Row 2, body cell 27 Row 2, body cell 28 Row 2, body cell 29 Row 2, body cell 30 Row 2, body cell 31 Row 2, body cell 32 Row 2, body cell 33 Row 2, body cell 34 Row 2, body cell 35 Row 2, body cell 36 Row 2, body cell 37 Row 2, body cell 38 Row 2, body cell 39 Row 2, body cell 40 Row 2, body cell 41 Row 2, body cell 42 Row 2, body cell 43 Row 2, body cell 44 Row 2, body cell 45 Row 2, body cell 46 Row 2, body cell 47 Row 2, body cell 48
Row 3, body cell 1 Row 3, body cell 2 Row 3, body cell 3 Row 3, body cell 4 Row 3, body cell 5 Row 3, body cell 6 Row 3, body cell 7 Row 3, body cell 8 Row 3, body cell 9 Row 3, body cell 10 Row 3, body cell 11 Row 3, body cell 12 Row 3, body cell 13 Row 3, body cell 14 Row 3, body cell 15 Row 3, body cell 16 Row 3, body cell 17 Row 3, body cell 18 Row 3, body cell 19 Row 3, body cell 20 Row 3, body cell 21 Row 3, body cell 22 Row 3, body cell 23 Row 3, body cell 24 Row 3, body cell 25 Row 3, body cell 26 Row 3, body cell 27 Row 3, body cell 28 Row 3, body cell 29 Row 3, body cell 30 Row 3, body cell 31 Row 3, body cell 32 Row 3, body cell 33 Row 3, body cell 34 Row 3, body cell 35 Row 3, body cell 36 Row 3, body cell 37 Row 3, body cell 38 Row 3, body cell 39 Row 3, body cell 40 Row 3, body cell 41 Row 3, body cell 42 Row 3, body cell 43 Row 3, body cell 44 Row 3, body cell 45 Row 3, body cell 46 Row 3, body cell 47 Row 3, body cell 48
Row 4, body cell 1 Row 4, body cell 2 Row 4, body cell 3 Row 4, body cell 4 Row 4, body cell 5 Row 4, body cell 6 Row 4, body cell 7 Row 4, body cell 8 Row 4, body cell 9 Row 4, body cell 10 Row 4, body cell 11 Row 4, body cell 12 Row 4, body cell 13 Row 4, body cell 14 Row 4, body cell 15 Row 4, body cell 16 Row 4, body cell 17 Row 4, body cell 18 Row 4, body cell 19 Row 4, body cell 20 Row 4, body cell 21 Row 4, body cell 22 Row 4, body cell 23 Row 4, body cell 24 Row 4, body cell 25 Row 4, body cell 26 Row 4, body cell 27 Row 4, body cell 28 Row 4, body cell 29 Row 4, body cell 30 Row 4, body cell 31 Row 4, body cell 32 Row 4, body cell 33 Row 4, body cell 34 Row 4, body cell 35 Row 4, body cell 36 Row 4, body cell 37 Row 4, body cell 38 Row 4, body cell 39 Row 4, body cell 40 Row 4, body cell 41 Row 4, body cell 42 Row 4, body cell 43 Row 4, body cell 44 Row 4, body cell 45 Row 4, body cell 46 Row 4, body cell 47 Row 4, body cell 48
`); }); });