Skip to content

Commit

Permalink
henry/91709/test: add test coverage for poi unsupported (#8041)
Browse files Browse the repository at this point in the history
* test: add test coverage

* test: switch from regex to string

* fix: change test coverage

---------

Co-authored-by: Henry Hein <henryhein@Henry-Heins-MacBook-Pro-T90XTJ00Q4.local>
Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@deriv.com>
  • Loading branch information
3 people committed Jun 19, 2023
1 parent eb7df52 commit 49ffe5a
Showing 1 changed file with 21 additions and 0 deletions.
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();
});
});

0 comments on commit 49ffe5a

Please sign in to comment.