import React from 'react';
import { render } from '@testing-library/react';
import { formatMessage } from '@theorchard/suite-i18n';
import { NotFoundPage } from '../notFoundPage';

describe('<NotFoundPage>', () => {
    test('has classname', () => {
        const { container } = render(<NotFoundPage />);
        const element = container.getElementsByClassName('NotFoundPage').item(0);
        expect(element).toBeVisible();
    });

    test('renders message', () => {
        const { getByText } = render(<NotFoundPage />);
        const element = getByText(formatMessage('error_pageNotFound_title'));
        expect(element).toBeVisible();
    });

    test('renders "notFound" illustration', () => {
        const { getByTestId } = render(<NotFoundPage />);
        const element = getByTestId('NotFoundIllustration');
        expect(element).toBeVisible();
    });
});
