-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Henry Hein
authored and
Henry Hein
committed
Mar 28, 2023
1 parent
8525051
commit 9e71ae4
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
packages/account/src/Components/poa/status/not-required/__tests__/not-required.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
import { screen, render } from '@testing-library/react'; | ||
import PoaNotRequired from '..'; | ||
|
||
jest.mock('@deriv/components', () => { | ||
const original_module = jest.requireActual('@deriv/components'); | ||
return { | ||
...original_module, | ||
Icon: jest.fn(() => <div>Mocked Icon</div>), | ||
}; | ||
}); | ||
|
||
describe('<PoaNotRequired />', () => { | ||
it('should render <PoaNotRequired /> component with its content', () => { | ||
render(<PoaNotRequired />); | ||
expect(screen.getByText('Proof of address verification not required')).toBeInTheDocument(); | ||
expect( | ||
screen.getByText( | ||
'Your account does not need address verification at this time. We will inform you if address verification is required in the future.' | ||
) | ||
).toBeInTheDocument(); | ||
expect(screen.getByText('Mocked Icon')).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters