import React from 'react';
import renderer from 'react-test-renderer';
import { Text } from '../../../';

describe('Text Component', () => {
    it('renders correctly with regular type', () => {
        const tree = renderer.create(<Text type="regular">Regular Text</Text>).toJSON();
        expect(tree).toMatchSnapshot();
    });

    it('renders correctly with h1 type', () => {
        const tree = renderer.create(<Text type="h1">Heading 1 Text</Text>).toJSON();
        expect(tree).toMatchSnapshot();
    });

    it('renders correctly with h2 type', () => {
        const tree = renderer.create(<Text type="h2">Heading 2 Text</Text>).toJSON();
        expect(tree).toMatchSnapshot();
    });

    it('renders correctly with h3 type', () => {
        const tree = renderer.create(<Text type="h3">Heading 3 Text</Text>).toJSON();
        expect(tree).toMatchSnapshot();
    });

    it('renders correctly with h4 type', () => {
        const tree = renderer.create(<Text type="h4">Heading 4 Text</Text>).toJSON();
        expect(tree).toMatchSnapshot();
    });

    it('renders correctly with h5 type', () => {
        const tree = renderer.create(<Text type="h5">Heading 5 Text</Text>).toJSON();
        expect(tree).toMatchSnapshot();
    });

    it('renders correctly with h6 type', () => {
        const tree = renderer.create(<Text type="h6">Heading 6 Text</Text>).toJSON();
        expect(tree).toMatchSnapshot();
    });
});
