import React from 'react';
import { composeStories } from '@storybook/react-vite';
import { render as testRender } from '../../../vitest/render';
import * as stories from './Preview.stories';
const composedStories = composeStories(stories);
describe('Preview Story Snapshots', () => {
it('has tests for all stories', () => {
const storyNames = Object.keys(composedStories);
const testedStories = new Set(['Default', 'TablePreview']);
const untestedStories = storyNames.filter(name => !testedStories.has(name));
expect(untestedStories).toEqual([]);
});
it('renders Default story', () => {
const Story = composedStories.Default;
const { container } = testRender(
| Header cell 2 | Header cell 2 | Header cell 3 | Header cell 4 |
|---|---|---|---|
| This is a product name | Row 1, cell 2 | Row 1, cell 3 | Row 1, cell 4 |
| This is a product name | Row 2, cell 2 | Row 2, cell 3 | Row 2, cell 4 |
| This is a product name | Row 3, cell 2 | Row 3, cell 3 | Row 3, cell 4 |
| This is a product name | Row 4, cell 2 | Row 4, cell 3 | Row 4, cell 4 |