import React from 'react'; import { composeStories } from '@storybook/react-vite'; import { render as testRender } from '../../../vitest/render'; import * as stories from './PromoHero.stories'; const composedStories = composeStories(stories); describe('PromoHero Story Snapshots', () => { it('has tests for all stories', () => { const storyNames = Object.keys(composedStories); const testedStories = new Set(['Default', 'WithImageFitContain', 'WithImageFitCover']); 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(`

Promo Hero Title

Promo Hero Description

Promo Hero Action
`); }); it('renders WithImageFitContain story', () => { const Story = composedStories.WithImageFitContain; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`

Promo Hero Title

Promo Hero Description

Promo Hero Action
`); }); it('renders WithImageFitCover story', () => { const Story = composedStories.WithImageFitCover; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`

Promo Hero Title

Promo Hero Description

Promo Hero Action
`); }); });