import React from 'react';
import { composeStories } from '@storybook/react-vite';
import { render as testRender } from '../../../vitest/render';
import * as stories from './Accordion.stories';
const composedStories = composeStories(stories);
describe('Accordion Story Snapshots', () => {
it('has tests for all stories', () => {
const storyNames = Object.keys(composedStories);
const testedStories = new Set([
'Default',
'Dense',
'SingleExpand',
'WithTopAndBottomDivider',
'WithBackground',
'WithTopDividerAndBackground',
'WithTopDivider',
'WithBottomDivider',
]);
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(`
Item 1
This is my content 1
Item 2
This is my content 2
Item 3
This is my content 3
`);
});
it('renders Dense story', () => {
const Story = composedStories.Dense;
const { container } = testRender( );
expect(container).toMatchInlineSnapshot(`
Item 1
This is my content 1
Item 2
This is my content 2
Item 3
This is my content 3
`);
});
it('renders SingleExpand story', () => {
const Story = composedStories.SingleExpand;
const { container } = testRender( );
expect(container).toMatchInlineSnapshot(`
Item 1
I will be closed when the other item is open.
Item 2
I will be closed when the other item is open.
Item 3
I will be closed when the other item is open.
`);
});
it('renders WithTopAndBottomDivider story', () => {
const Story = composedStories.WithTopAndBottomDivider;
const { container } = testRender( );
expect(container).toMatchInlineSnapshot(`
I already have campaigns on Google, can I also use Shoptet Campaigns?
Yes, you can leverage Shoptet Campaigns in addition to your existing campaigns on Google.
I already have an advertising account, can I use it?
Before we launch your advertisement, please review and examine everything to see how and where it will appear within the Google advertising system. Once you approve everything, Google will begin approving the ads before publishing them. This process may take several hours to two days. Therefore, we ask for your patience.
Will I have access to the account where the campaigns are running?
Yes, you will have access to the account where the campaigns are running.
Can I pause or adjust my campaigns after they are launched?
Yes, campaigns can be updated over time based on your business goals and current performance.
`);
});
it('renders WithBackground story', () => {
const Story = composedStories.WithBackground;
const { container } = testRender( );
expect(container).toMatchInlineSnapshot(`
Item 1
This is my content 1
Item 2
This is my content 2
Item 3
This is my content 3
`);
});
it('renders WithTopDividerAndBackground story', () => {
const Story = composedStories.WithTopDividerAndBackground;
const { container } = testRender( );
expect(container).toMatchInlineSnapshot(`
Item 1
This is my content 1
Item 2
This is my content 2
Item 3
This is my content 3
`);
});
it('renders WithTopDivider story', () => {
const Story = composedStories.WithTopDivider;
const { container } = testRender( );
expect(container).toMatchInlineSnapshot(`
Item 1
This is my content 1
Item 2
This is my content 2
Item 3
This is my content 3
`);
});
it('renders WithBottomDivider story', () => {
const Story = composedStories.WithBottomDivider;
const { container } = testRender( );
expect(container).toMatchInlineSnapshot(`
Item 1
This is my content 1
Item 2
This is my content 2
Item 3
This is my content 3
`);
});
});