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

Landing Content Title

This is a description for the landing content. It can be a simple string or any React node.

Here is some custom content!
`); }); it('renders TitleOnly story', () => { const Story = composedStories.TitleOnly; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`

Landing Content Title

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

Landing Content Title

This is a description for the landing content. It can be a simple string or any React node.

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

Landing Content Title

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

Landing Content Title

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

Landing Content Title

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

Landing Content Title

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

Landing Content Title

Here is some custom content!
`); }); });