1
1
import React from 'react' ;
2
- import { cleanup , render , waitFor , screen } from '@testing-library/react' ;
3
- import { createBrowserHistory } from 'history' ;
4
2
import { Router } from 'react-router' ;
3
+ import { createBrowserHistory } from 'history' ;
4
+
5
5
import { 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' ;
6
9
import userEvent from '@testing-library/user-event' ;
7
- import { StoreProvider , mockStore } from '@deriv/stores' ;
10
+
8
11
import PersonalDetailsForm from '../personal-details-form' ;
9
- import { useGrowthbookGetFeatureValue , useResidenceList } from '@deriv/hooks' ;
10
12
11
13
afterAll ( cleanup ) ;
12
14
jest . mock ( '@deriv/components' , ( ) => ( {
@@ -18,6 +20,30 @@ jest.mock('@deriv/shared/src/services/ws-methods', () => ({
18
20
WS : {
19
21
send : jest . fn ( ) . mockResolvedValue ( { time : 1620000000 } ) ,
20
22
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
+ } ,
21
47
} ,
22
48
useWS : ( ) => undefined ,
23
49
} ) ) ;
0 commit comments