-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Amina/fix: disable account when proof failed (#9555)
* fix: disable account when proof failed * fix: disable account when proof failed * fix: flag * fix: import * fix: update with master
- Loading branch information
1 parent
8b90802
commit 3133e6f
Showing
4 changed files
with
86 additions
and
14 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
packages/appstore/src/components/cfds-listing/__tests__/index.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,39 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import { StoreProvider, mockStore } from '@deriv/stores'; | ||
import CFDsListing from '../index'; | ||
|
||
jest.mock('Components/containers/listing-container', () => | ||
jest.fn(({ children }) => <div data-testid='listing-container'>{children}</div>) | ||
); | ||
|
||
describe('CFDsListing', () => { | ||
const mock = mockStore({ | ||
traders_hub: { | ||
selected_region: 'NON-EU', | ||
has_any_real_account: true, | ||
is_real: true, | ||
can_get_more_cfd_mt5_accounts: true, | ||
no_MF_account: true, | ||
}, | ||
client: { | ||
is_landing_company_loaded: true, | ||
real_account_creation_unlock_date: '2022-02-02', | ||
}, | ||
modules: { | ||
cfd: { | ||
toggleCompareAccountsModal: jest.fn(), | ||
setAccountType: jest.fn(), | ||
}, | ||
}, | ||
}); | ||
|
||
it('should render the component', () => { | ||
const wrapper = ({ children }: { children: JSX.Element }) => ( | ||
<StoreProvider store={mock}>{children}</StoreProvider> | ||
); | ||
|
||
render(<CFDsListing />, { wrapper }); | ||
expect(screen.getByTestId('listing-container')).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
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
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