import React from 'react';
import { composeStories } from '@storybook/react-vite';
import { render as testRender } from '../../../vitest/render';
import * as stories from './Image.stories';
const composedStories = composeStories(stories);
describe('Image Story Snapshots', () => {
it('has tests for all stories', () => {
const storyNames = Object.keys(composedStories);
const testedStories = new Set([
'Default',
'Responsive',
'CoverWithCustomRatio',
'Example800x600',
'Portrait600x900',
'Small200x200',
'Square600x600',
'Large2000x1200',
'Widescreen1600x900',
'SizeSmall',
'SizeLarge',
'LoadingError',
]);
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(`
`);
});
it('renders Responsive story', () => {
const Story = composedStories.Responsive;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders CoverWithCustomRatio story', () => {
const Story = composedStories.CoverWithCustomRatio;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Example800x600 story', () => {
const Story = composedStories.Example800x600;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Portrait600x900 story', () => {
const Story = composedStories.Portrait600x900;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Small200x200 story', () => {
const Story = composedStories.Small200x200;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Square600x600 story', () => {
const Story = composedStories.Square600x600;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Large2000x1200 story', () => {
const Story = composedStories.Large2000x1200;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Widescreen1600x900 story', () => {
const Story = composedStories.Widescreen1600x900;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders SizeSmall story', () => {
const Story = composedStories.SizeSmall;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders SizeLarge story', () => {
const Story = composedStories.SizeLarge;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders LoadingError story', () => {
const Story = composedStories.LoadingError;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
});