Skip to content

Commit fd1a81b

Browse files
committed
fix: update test
1 parent 11dae43 commit fd1a81b

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

packages/account/src/Sections/Profile/PersonalDetails/__tests__/personal-details-form.spec.tsx

+30-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import React from 'react';
2-
import { cleanup, render, waitFor, screen } from '@testing-library/react';
3-
import { createBrowserHistory } from 'history';
42
import { Router } from 'react-router';
3+
import { createBrowserHistory } from 'history';
4+
55
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';
69
import userEvent from '@testing-library/user-event';
7-
import { StoreProvider, mockStore } from '@deriv/stores';
10+
811
import PersonalDetailsForm from '../personal-details-form';
9-
import { useGrowthbookGetFeatureValue, useResidenceList } from '@deriv/hooks';
1012

1113
afterAll(cleanup);
1214
jest.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

Comments
 (0)