Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

henry/91709/test: add test coverage for poi unsupported #8041

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import { screen, render } from '@testing-library/react';
import UnsupportedFailed from '../unsupported-failed';

jest.mock('@deriv/components', () => {
const original_module = jest.requireActual('@deriv/components');
return {
...original_module,
Icon: jest.fn(() => <div>Mocked Icon</div>),
};
});

describe('<UnsupportedFailed />', () => {
const error = 'error';
it('should render <UnsupportedFailed /> component with its content', () => {
render(<UnsupportedFailed error={error} />);
expect(screen.getByText('Proof of identity documents upload failed')).toBeInTheDocument();
expect(screen.getByText('error')).toBeInTheDocument();
expect(screen.getByText('Mocked Icon')).toBeInTheDocument();
});
});