import React from 'react';
import { composeStories } from '@storybook/react-vite';
import { render as testRender } from '../../../vitest/render';
import * as stories from './PreviewImage.stories';
const composedStories = composeStories(stories);
describe('PreviewImage Story Snapshots', () => {
it('has tests for all stories', () => {
const storyNames = Object.keys(composedStories);
const testedStories = new Set(['Default', 'PreviewImageInTable', 'LargeImage']);
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 3 | Header cell 4 | |
|---|---|---|---|
| Row 1, cell 2 | Row 1, cell 3 |
|
Row 1, cell 4 |
| Row 2, cell 2 | Row 2, cell 3 |
|
Row 2, cell 4 |
| Row 3, cell 2 | Row 3, cell 3 |
|
Row 3, cell 4 |
| Row 4, cell 2 | Row 4, cell 3 |
|
Row 4, cell 4 |