import { render } from '@testing-library/react';
import React from 'react';
import MarketingBlurb from '../marketing-blurb';
import type { MarketingBlurbProps } from '../marketing-blurb';

describe('<MarketingBlurb>', () => {
    const defaultProps: MarketingBlurbProps = {
        editable: true,
        productId: '123',
        marketingProgramInfosState: {
            marketingProgramInfos: [],
            setMarketingProgramInfos: jest.fn(),
        },
    };

    const renderWrapper = (props: Partial<MarketingBlurbProps> = {}) =>
        render(<MarketingBlurb {...defaultProps} {...props} />);

    describe('Renders component', () => {
        test('Matches snapshot', () => {
            const { container } = renderWrapper();
            expect(container).toMatchSnapshot();
        });
    });
});
