11import React from 'react' ;
2- import { cleanup , render , waitFor , screen } from '@testing-library/react' ;
3- import { createBrowserHistory } from 'history' ;
42import { Router } from 'react-router' ;
3+ import { createBrowserHistory } from 'history' ;
4+
55import { APIProvider } from '@deriv/api' ;
6+ import { useGrowthbookGetFeatureValue , useResidenceList } from '@deriv/hooks' ;
7+ import { mockStore , StoreProvider } from '@deriv/stores' ;
8+ import { cleanup , render , screen , waitFor } from '@testing-library/react' ;
69import userEvent from '@testing-library/user-event' ;
7- import { StoreProvider , mockStore } from '@deriv/stores' ;
10+
811import PersonalDetailsForm from '../personal-details-form' ;
9- import { useGrowthbookGetFeatureValue , useResidenceList } from '@deriv/hooks' ;
1012
1113afterAll ( cleanup ) ;
1214jest . mock ( '@deriv/components' , ( ) => ( {
@@ -18,6 +20,30 @@ jest.mock('@deriv/shared/src/services/ws-methods', () => ({
1820 WS : {
1921 send : jest . fn ( ) . mockResolvedValue ( { time : 1620000000 } ) ,
2022 wait : ( ...payload : [ ] ) => Promise . resolve ( [ ...payload ] ) ,
23+ authorized : {
24+ storage : {
25+ getFinancialAssessment : jest . fn ( ( ) =>
26+ Promise . resolve ( {
27+ get_financial_assessment : {
28+ account_turnover : '' ,
29+ cfd_score : 0 ,
30+ education_level : '' ,
31+ employment_industry : '' ,
32+ employment_status : 'Employed' ,
33+ estimated_worth : '' ,
34+ financial_information_score : '' ,
35+ financial_information_version : '' ,
36+ income_source : '' ,
37+ net_income : '' ,
38+ occupation : '' ,
39+ source_of_wealth : '' ,
40+ total_score : '' ,
41+ trading_score : '' ,
42+ } ,
43+ } )
44+ ) ,
45+ } ,
46+ } ,
2147 } ,
2248 useWS : ( ) => undefined ,
2349} ) ) ;
0 commit comments