Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COJ] Likhith/186/enhance idv form for uganda #11295

Merged
Show file tree
Hide file tree
Changes from 191 commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
8a1b112
chore: new pr for wall 400
Jun 1, 2023
55ca37e
Merge branch 'master' into evgeniy-likhith/wall-400/incorporate-IDV-f…
likhith-deriv Jun 1, 2023
1e4d5f2
feat: :sparkles: incorporated change to display the id document name
likhith-deriv Jun 2, 2023
5b83b7c
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 2, 2023
2d057b7
chore: country selector warning if failed
Jun 2, 2023
60212f9
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 2, 2023
aafea55
fix: :recycle: resolved comments
likhith-deriv Jun 2, 2023
1e21aa1
refactor: css file rename
Jun 2, 2023
354e035
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 2, 2023
b5677c7
feat: resolved code smell
likhith-deriv Jun 2, 2023
846b70f
refactor: expired and failed different warnings
Jun 5, 2023
98190f7
refactor: failed messaged moved to country selector
Jun 5, 2023
8450e93
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 6, 2023
d7947f1
chore: :green_heart: trigger build
likhith-deriv Jun 6, 2023
4cea8ce
refactor: review comments
Jun 7, 2023
feec7ee
refactor: review comments css
Jun 7, 2023
9251eac
fix: :bug: incorporated message to display document type
likhith-deriv Jun 7, 2023
25f1428
fix: resolved code smell
likhith-deriv Jun 7, 2023
5f5ff9f
fix: :bug: incorporated generic error message
likhith-deriv Jun 7, 2023
4da3cf4
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Jun 7, 2023
8a854c8
fix: :bug: added missing dependency
likhith-deriv Jun 7, 2023
7b7162d
chore: :twisted_rightwards_arrows: synced with master
likhith-deriv Jun 8, 2023
d85dfdd
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Jun 8, 2023
9b7045e
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Jun 8, 2023
6bed18e
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Jun 12, 2023
87e7f22
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Jun 12, 2023
b6d4a5d
fix: :recycle: incorporated review comments
likhith-deriv Jun 12, 2023
0086aac
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 12, 2023
93faee8
fix: resolved un necessary render issue
likhith-deriv Jun 12, 2023
77a2f8a
fix: resolve conflicts, update from master
Jun 12, 2023
df673be
fix: :bug: resolved issue with expired status
likhith-deriv Jun 13, 2023
35ff78f
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 14, 2023
d5b5228
style: fix side container width in poi (#39)
shahzaib-deriv Jun 14, 2023
524a24a
style: container height fix for POI error messages when content in no…
shahzaib-deriv Jun 14, 2023
3081a65
fix: onfido message alignment
Jun 14, 2023
a856c79
fix: :bug: incorporated continue trade button
likhith-deriv Jun 14, 2023
c15a225
fix: onfido page mobile
Jun 14, 2023
98bb54a
style: no padding on fields container in idv screen (#41)
shahzaib-deriv Jun 15, 2023
74435a9
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 16, 2023
b1542ae
refactor: onfido hint center alignment fix
Jun 16, 2023
f49eae8
fix: odd translate value fix
Jun 16, 2023
4d7b8e3
fix: :bug: minor CSS fix
likhith-deriv Jun 18, 2023
fdc0b9e
fix: green message responsive position
Jun 18, 2023
3880f11
fix: green message full width
Jun 19, 2023
e6a54f4
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 19, 2023
dc858e0
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 19, 2023
8e66495
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 19, 2023
f047a86
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 19, 2023
e0e8342
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 20, 2023
d79a438
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 20, 2023
7bf25eb
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 20, 2023
6fc9235
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 21, 2023
278c435
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
yauheni-deriv Jun 22, 2023
cf37564
feat: Merge branch 'master' into combined/wall-400/IDV-error-message-…
likhith-deriv Jul 6, 2023
c92eb94
chore: :twisted_rightwards_arrows: sync with master
likhith-deriv Jul 17, 2023
0ec5333
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Jul 18, 2023
2b4a404
fix: :white_check_mark: updated testcases
likhith-deriv Jul 18, 2023
72f9878
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Jul 20, 2023
d686d79
chore:Merge branch 'master' into combined/wall-400/IDV-error-message-…
likhith-deriv Aug 4, 2023
2d98c8e
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Aug 9, 2023
63d8a7a
chore:Merge branch 'master' into combined/wall-400/IDV-error-message-…
likhith-deriv Aug 9, 2023
9e1966e
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Aug 18, 2023
5b5ef29
fix: failing tests
Aug 18, 2023
b4fd073
refactor: code and ts fixes
Aug 19, 2023
ec0b232
fix: display of IDV error
likhith-deriv Aug 22, 2023
01aaa05
Merge branch 'master' of github.com:binary-com/deriv-app into combine…
Aug 28, 2023
9a84342
Merge branch 'combined/wall-400/IDV-error-message-handled' of github.…
Sep 1, 2023
e5f76bd
Merge branch 'combined/wall-400/IDV-error-message-handled' of github.…
Sep 4, 2023
8b57104
chore: add duplication account error
Sep 4, 2023
64245d3
refactor: added undefined check to response data
Sep 5, 2023
4b2cd94
Merge branch 'master' of github.com:binary-com/deriv-app into combine…
Sep 6, 2023
c338bd1
Merge branch 'master' of github.com:binary-com/deriv-app into combine…
Sep 6, 2023
97f17a0
fix: resolve conflicts, update from master
Sep 7, 2023
674a357
Merge branch 'master' of github.com:binary-com/deriv-app into combine…
Sep 7, 2023
1916fc2
chore: review comments
Sep 7, 2023
d307fd2
chore: review comments
Sep 7, 2023
c7f7418
Merge branch 'combined/wall-400/IDV-error-message-handled' of github.…
Sep 7, 2023
f890064
fix: :recycle: incorporated review comments
likhith-deriv Sep 8, 2023
26c4c53
fix: barriers test fix form master
Sep 8, 2023
f07b8b2
Merge branch 'master' of github.com:binary-com/deriv-app into combine…
Sep 8, 2023
0700c3c
fix: barriers test
Sep 8, 2023
dad8f16
chore: refactored object.freeze to as const
shahzaib-deriv Sep 8, 2023
c03f8cd
chore: optional chaining to document type
shahzaib-deriv Sep 8, 2023
264a1ad
chore: update spec file for idv-form
shahzaib-deriv Sep 8, 2023
29bc513
test: update personal-details spec
shahzaib-deriv Sep 8, 2023
b4ae1ad
chore: review comments
Sep 8, 2023
9ddf8a2
refactor: css structure
Sep 8, 2023
c361a07
fix: barriers test
Sep 8, 2023
8405ddd
fix: :recycle: incorporated review comments
likhith-deriv Sep 11, 2023
f84957d
Merge branch 'master' of github.com:binary-com/deriv-app into combine…
Sep 11, 2023
8d9810a
refactor: rename properties
Sep 11, 2023
dcfa02b
refactor: remove is_appstore from tests
Sep 11, 2023
97f65b8
refactor: styles refactor
Sep 11, 2023
c1dc530
fix: :zap: reduced duplicate data
likhith-deriv Sep 11, 2023
3dd0d91
fix: incorporated review comments
likhith-deriv Sep 12, 2023
d0e639b
fix: :recycle: incorporated review comments
likhith-deriv Sep 12, 2023
b533d84
chore: Trigger Build
likhith-deriv Sep 12, 2023
2de0b57
fix: :truck: modified path
likhith-deriv Sep 12, 2023
7c7ffce
fix: resolve conflicts
Sep 12, 2023
b5b051b
Merge branch 'master' of github.com:binary-com/deriv-app into combine…
Sep 12, 2023
41965bf
chore: remove unused fila and variable, updated icons
Sep 12, 2023
a92e7e4
revert: :beers: removed icon changes
likhith-deriv Sep 12, 2023
fa3e7b6
refactor: removed formatting
likhith-deriv Sep 12, 2023
0552d43
fix: removed assignment of default values
likhith-deriv Sep 13, 2023
14f91cd
Merge branch 'master' of github.com:binary-com/deriv-app into combine…
Sep 13, 2023
fcb5fd2
fix: resolve conflicts
Sep 13, 2023
fccec9a
fix: :bug: unable to select a new doc supporting country
likhith-deriv Sep 13, 2023
2274b1b
fix: :bug: resolved re-render issue
likhith-deriv Sep 13, 2023
abca13b
fix: :zap: resolved message issue
likhith-deriv Sep 14, 2023
b25608d
refactor: :truck: renamed varibales
likhith-deriv Sep 14, 2023
b3e1efa
fix: :test_tube: failing testcase
likhith-deriv Sep 14, 2023
348f57f
fix: :bug: resolved issues with failure messages
likhith-deriv Sep 14, 2023
d7dc9f2
fix: :bug: resolved issue with DIEL accounts
likhith-deriv Sep 14, 2023
51aeefc
fix: :bug: fixed issue for DIEL clients
likhith-deriv Sep 14, 2023
f1d3cf9
fix: styling issues
Sep 14, 2023
7a21637
fix: ts error for format-response
Sep 14, 2023
73ffaa7
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Sep 15, 2023
d9689c2
fix: :truck: fixed path
likhith-deriv Sep 15, 2023
e6e2b3a
fix: :truck: fixed path
likhith-deriv Sep 15, 2023
89864df
Merge branch 'master' of github.com:binary-com/deriv-app into combine…
Sep 15, 2023
f12bce7
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Sep 18, 2023
caa4a48
fix: :bug: resolved styling bugs
likhith-deriv Sep 18, 2023
a1c1467
fix: :bug: resolved styling bugs
likhith-deriv Sep 18, 2023
445aadd
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Sep 18, 2023
0908b97
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Sep 18, 2023
3a13759
fix: :fire: incorporated new styles to fix icon size
likhith-deriv Sep 18, 2023
8bf66f0
fix: :fire: incorporated new styles to fix icon size
likhith-deriv Sep 18, 2023
7826b54
fix: :white_check_mark: fixed failing testcase
likhith-deriv Sep 19, 2023
e422b8c
fix: :green_heart: eslint issues
likhith-deriv Sep 19, 2023
15deecb
fix: layout styles
likhith-deriv Sep 19, 2023
1156001
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Sep 20, 2023
51113d1
Merge branch 'master' of github.com:binary-com/deriv-app into combine…
Sep 20, 2023
7af2e86
fix: style issues
likhith-deriv Sep 20, 2023
b6ffe6f
fix: styles
likhith-deriv Sep 20, 2023
d9d06b1
fix: moved common styles to core
likhith-deriv Sep 20, 2023
6c26c35
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Sep 20, 2023
7763256
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Sep 21, 2023
c3dbc11
fix: :lipstick: updated styles
likhith-deriv Sep 21, 2023
66fda4a
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Sep 22, 2023
9454e04
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Sep 22, 2023
ab75599
refactor: incorporated review comments
likhith-deriv Sep 22, 2023
e21e6f2
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Oct 2, 2023
db1583a
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Oct 2, 2023
7a40cd4
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Oct 2, 2023
18e9307
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Oct 3, 2023
1ed068f
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Oct 3, 2023
7248149
Merge branch 'master' into combined/wall-400/IDV-error-message-handled
likhith-deriv Oct 3, 2023
c7d606c
fix: bug: /WEBREL-1358/personal-details page and poa page css issue
Oct 5, 2023
565d520
fix: layout button
likhith-deriv Oct 5, 2023
3052c5e
fix: layout button
likhith-deriv Oct 5, 2023
a368f8e
Merge branch 'combined/wall-400/IDV-error-message-handled' into likhi…
likhith-deriv Oct 5, 2023
b45ca63
Merge branch 'evgeniy/WEBREL-1358/personal-details_and_poa-page_css_i…
likhith-deriv Oct 5, 2023
bdf35ff
fix: mt5 next button not getting enabled
Oct 5, 2023
59ba94e
fix: resolved issue with button
likhith-deriv Oct 5, 2023
4a21774
fix: resolved issue with button
likhith-deriv Oct 5, 2023
17c1c43
fix: resolved missing dropdown
likhith-deriv Oct 5, 2023
6dc0eb6
fix: removed console
likhith-deriv Oct 6, 2023
fe5ee5a
fix: incorporated review comments
likhith-deriv Oct 6, 2023
7bfbb3e
feat: :sparkles: incorporated new images and merged checkbox feature
likhith-deriv Oct 6, 2023
3f29245
feat: :sparkles: incorporated new images and merged checkbox feature
likhith-deriv Oct 9, 2023
525f984
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 9, 2023
079fc0e
fix: idv failed document type
likhith-deriv Oct 9, 2023
383a47a
fix: incorporated error message scenario
likhith-deriv Oct 10, 2023
f77cbc8
fix: styling as per new figma
likhith-deriv Oct 10, 2023
ed9346a
fix: styling as per new figma
likhith-deriv Oct 10, 2023
05d3bf9
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 10, 2023
2f1bf0f
fix: spacing between fields
likhith-deriv Oct 11, 2023
00fb70e
fix: spacing between fields
likhith-deriv Oct 11, 2023
f629cf6
fix: spacing between fields
likhith-deriv Oct 11, 2023
c7e3be5
fix: incorporated new error code and styles as per new figma
likhith-deriv Oct 11, 2023
05264c2
fix: incorporated new error code and styles as per new figma
likhith-deriv Oct 11, 2023
edc565d
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 12, 2023
929df14
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 12, 2023
488bea3
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 12, 2023
94309ec
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 13, 2023
6a89f87
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 14, 2023
3cee86a
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 16, 2023
cfa0eb0
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 18, 2023
da92044
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 24, 2023
ded0382
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 25, 2023
26859ee
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 26, 2023
483ef4a
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 26, 2023
54abf1a
fix: code smells
likhith-deriv Oct 26, 2023
d39d120
Merge branch 'master' into likhith/kyc-195/display-idv-error-messages
likhith-deriv Oct 30, 2023
a96871f
chore: trigger rebuild
likhith-deriv Oct 30, 2023
0c989c1
fix: issue with checkbox
likhith-deriv Oct 30, 2023
0e1a251
feat: added hint text and updated label text for Uganda
likhith-deriv Oct 31, 2023
cb08ffb
Merge branch 'master' into likhith/COJ-186/enhance-idv-form-for-uganda
likhith-deriv Nov 9, 2023
f3be940
chore: trigger build
likhith-deriv Nov 9, 2023
94374d8
fix: :dizzy: added translation for Additional document
likhith-deriv Nov 9, 2023
231f0ef
Merge branch 'master' into likhith/COJ-186/enhance-idv-form-for-uganda
likhith-deriv Nov 10, 2023
bef7322
fix: sub task COJ-209
likhith-deriv Nov 10, 2023
075ec0e
fix: sub task COJ-209
likhith-deriv Nov 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React from 'react';
import { Formik } from 'formik';
import { render, screen, waitFor } from '@testing-library/react';
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import IDVForm from '../idv-form';
import { TIDVFormValues } from 'Types';

jest.mock('Helpers/utils', () => ({
...jest.requireActual('Helpers/utils'),
Expand Down Expand Up @@ -32,7 +33,7 @@ jest.mock('@deriv/shared', () => ({
}));

describe('<IDVForm/>', () => {
const mock_props = {
const mock_props: React.ComponentProps<typeof IDVForm> = {
selected_country: {
value: 'tc',
identity: {
Expand Down Expand Up @@ -99,4 +100,62 @@ describe('<IDVForm/>', () => {
expect(screen.queryByText('Test document 1 name')).not.toBeInTheDocument();
});
});

it('should render the hint messages for the selected document', async () => {
const new_props: React.ComponentProps<typeof IDVForm> = {
selected_country: {
value: 'tc',
identity: {
services: {
idv: {
documents_supported: {
document_1: {
display_name: 'Test document 1 name',
format: '5436454364243',
additional: {
display_name: 'Test document additional',
format: '001234',
},
},
document_2: {
display_name: 'Test document 2 name',
format: 'A54321',
},
},
has_visual_sample: 1,
},
},
},
},
};

const new_values: TIDVFormValues = {
...mock_values,
document_type: {
...mock_values.document_type,
text: '12345',
additional: {
display_name: 'Additional number',
example_format: '0123456789',
},
},
};

render(<IDVForm {...new_props} />, {
wrapper: ({ children }) => (
<Formik initialValues={new_values} onSubmit={jest.fn()}>
{() => children}
</Formik>
),
});

const document_type_input = screen.getByLabelText('Choose the document type');

userEvent.click(document_type_input);
await waitFor(() => {
const el_selected_document = screen.getByText('Test document 1 name');
fireEvent.change(el_selected_document);
});
expect(await screen.findByText('Example: 0123456789')).toBeInTheDocument();
});
});
Loading