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

farrah/P2PS-3011/update available balance #117

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Expand Up @@ -12,13 +12,27 @@
box-shadow: 0px 32px 64px 0px rgba(14, 14, 14, 0.14);

&__text {
margin: 2.4rem 0;
margin: 2.4rem 0 1.6rem;

@include mobile {
margin: 1.6rem 0;
}
}

&__list {
list-style: disc;
margin: 0 0 0.6rem 2rem;

li {
margin-bottom: 1rem;
}
}

&__note {
font-style: italic;
margin: 1.6rem 0 2.4rem;
}

@include mobile {
padding: 1.6rem;
width: 32.8rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,25 @@ const AvailableP2PBalanceModal = ({ isModalOpen, onRequestClose }: TAvailableP2P
testId='dt_available_p2p_balance_modal'
>
<Text as='p' weight='bold'>
<Localize i18n_default_text='Available Deriv P2P Balance' />
<Localize i18n_default_text='Deriv P2P balance' />
</Text>
<Text as='p' className='block-unblock-user-modal__text' size='sm'>
<Localize i18n_default_text='Your Deriv P2P balance only includes deposits that can’t be reversed.' />
<Text as='p' className='available-balance-modal__text' size='sm'>
<Localize i18n_default_text='Your Deriv P2P balance includes:' />
</Text>
<Text as='p' className='block-unblock-user-modal__text' size='sm'>
<Localize i18n_default_text='Deposits via cards and the following payment methods aren’t included: Maestro, Diners Club, ZingPay, Skrill, Neteller, Ozow, and UPI QR.' />
<ol className='available-balance-modal__list'>
<Text as='li' size='sm'>
<Localize i18n_default_text='P2P deposits: Funds received from buying USD from another Deriv P2P user.' />
</Text>
<Text as='li' size='sm'>
<Localize i18n_default_text='Non-reversible deposits: Deposits from non-reversible payment methods.' />
</Text>
</ol>
<Text as='p' className='available-balance-modal__note' size='sm'>
<Localize i18n_default_text='Note: Funds deposited using reversible payment methods, like credit cards, Maestro, Diners Club, ZingPay, Skrill, Neteller, Ozow, and UPI QR will not appear in your P2P balance.' />
</Text>
<div className='block-unblock-user-modal__footer'>
<div className='available-balance-modal__footer'>
<Button onClick={onRequestClose} size='lg' textSize='sm'>
<Localize i18n_default_text='Ok' />
<Localize i18n_default_text='OK' />
</Button>
</div>
</Modal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ describe('AvailableP2PBalanceModal', () => {
render(<MockApp />);
expect(screen.getByTestId('dt_available_p2p_balance_modal')).toBeInTheDocument();
});
it('should perform callback to onRequestClose when Ok button is clicked', async () => {
it('should perform callback to onRequestClose when OK button is clicked', async () => {
render(<MockApp />);
const okBtn = screen.getByRole('button', {
name: 'Ok',
name: 'OK',
});
await userEvent.click(okBtn);
expect(mockOnRequestClose).toBeCalled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('ProfileBalance', () => {
await userEvent.click(balanceInfoIcon);
expect(screen.getByTestId('dt_available_p2p_balance_modal')).toBeInTheDocument();
const okButton = screen.getByRole('button', {
name: 'Ok',
name: 'OK',
});
await userEvent.click(okButton);
expect(screen.queryByTestId('dt_available_p2p_balance_modal')).not.toBeInTheDocument();
Expand Down
Loading