diff --git a/packages/account/src/Sections/Verification/ProofOfOwnership/__test__/proof-of-ownership.spec.js b/packages/account/src/Sections/Verification/ProofOfOwnership/__test__/proof-of-ownership.spec.tsx similarity index 85% rename from packages/account/src/Sections/Verification/ProofOfOwnership/__test__/proof-of-ownership.spec.js rename to packages/account/src/Sections/Verification/ProofOfOwnership/__test__/proof-of-ownership.spec.tsx index 121fabf2f3bb..11cefedf8b0a 100644 --- a/packages/account/src/Sections/Verification/ProofOfOwnership/__test__/proof-of-ownership.spec.js +++ b/packages/account/src/Sections/Verification/ProofOfOwnership/__test__/proof-of-ownership.spec.tsx @@ -1,11 +1,16 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; -import { ProofOfOwnership } from '../proof-of-ownership.jsx'; -import test_data from './test-data'; +import { GetAccountStatus } from '@deriv/api-types'; import { StoreProvider, mockStore } from '@deriv/stores'; +import { ProofOfOwnership } from '../proof-of-ownership'; +import test_data from './test-data'; + +type TRequests = DeepRequired['authentication']['ownership']['requests']; +type TStatus = DeepRequired['authentication']['ownership']['status']; describe('proof-of-ownership.jsx', () => { - let ownership_temp; + let ownership_temp: typeof test_data; + beforeAll(() => { ownership_temp = test_data; }); @@ -16,7 +21,7 @@ describe('proof-of-ownership.jsx', () => { ); }; - let store = mockStore(); + let store = mockStore({}); it('should render no poo required status page', () => { store = mockStore({ client: { @@ -94,7 +99,10 @@ describe('proof-of-ownership.jsx', () => { client: { account_status: { authentication: { - ownership: { requests: ownership_temp.requests, status: ownership_temp.status }, + ownership: { + requests: ownership_temp.requests as TRequests, + status: ownership_temp.status as TStatus, + }, needs_verification: ['ownership'], }, }, diff --git a/packages/account/src/Sections/Verification/ProofOfOwnership/__test__/test-data.js b/packages/account/src/Sections/Verification/ProofOfOwnership/__test__/test-data.ts similarity index 95% rename from packages/account/src/Sections/Verification/ProofOfOwnership/__test__/test-data.js rename to packages/account/src/Sections/Verification/ProofOfOwnership/__test__/test-data.ts index bef75681385b..cf7864e09c13 100644 --- a/packages/account/src/Sections/Verification/ProofOfOwnership/__test__/test-data.js +++ b/packages/account/src/Sections/Verification/ProofOfOwnership/__test__/test-data.ts @@ -1,12 +1,14 @@ export default { requests: [ { - id: '1', + creation_time: '123', + id: 1, payment_method: 'beyonic', documents_required: 1, }, { - id: '2', + creation_time: '234', + id: 2, payment_method: 'boleto (d24 voucher)', documents_required: 1, }, diff --git a/packages/account/src/Sections/Verification/ProofOfOwnership/proof-of-ownership.tsx b/packages/account/src/Sections/Verification/ProofOfOwnership/proof-of-ownership.tsx index f38f453f42df..e6873692a2a7 100644 --- a/packages/account/src/Sections/Verification/ProofOfOwnership/proof-of-ownership.tsx +++ b/packages/account/src/Sections/Verification/ProofOfOwnership/proof-of-ownership.tsx @@ -3,7 +3,7 @@ import { withRouter } from 'react-router-dom'; import { GetAccountStatus } from '@deriv/api-types'; import { Loading } from '@deriv/components'; import { observer, useStore } from '@deriv/stores'; -import ProofOfOwnershipForm from './proof-of-ownership-form.jsx'; +import ProofOfOwnershipForm from './proof-of-ownership-form'; import { POONotRequired, POOVerified, POORejetced, POOSubmitted } from 'Components/poo/statuses'; import { POO_STATUSES } from 'Constants/poo-identifier'; import getPaymentMethodsConfig from '../../../Configs/payment-method-config';