-
Notifications
You must be signed in to change notification settings - Fork 298
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
Aum/wall 228/crypto cashier changes for third party processor coinspaid #8343
Aum/wall 228/crypto cashier changes for third party processor coinspaid #8343
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
A production App ID was automatically generated for this PR. (log)
Click here to copy & paste above information.
|
🚨 Lighthouse report for the changes in this PR:
Lighthouse ran with https://deriv-app-git-fork-aum-deriv-aum-wall-228crypto-cashier-8fd026.binary.sx/ |
…L-228/crypto-cashier-changes-for-third-party-processor-coinspaid
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #8343 +/- ##
==========================================
+ Coverage 20.81% 20.83% +0.02%
==========================================
Files 1561 1562 +1
Lines 36118 36129 +11
Branches 7091 7094 +3
==========================================
+ Hits 7518 7528 +10
- Misses 27858 27860 +2
+ Partials 742 741 -1
|
…L-228/crypto-cashier-changes-for-third-party-processor-coinspaid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update your branch with the latest master 🙏🏻
packages/cashier/src/pages/deposit/crypto-deposit/crypto-deposit.tsx
Outdated
Show resolved
Hide resolved
packages/cashier/src/pages/deposit/crypto-deposit/crypto-deposit.tsx
Outdated
Show resolved
Hide resolved
packages/cashier/src/pages/deposit/crypto-deposit/crypto-deposit.tsx
Outdated
Show resolved
Hide resolved
packages/cashier/src/components/crypto-transactions-history/crypto-transactions-renderer.tsx
Outdated
Show resolved
Hide resolved
...r/src/components/crypto-transactions-history/__tests__/crypto-transactions-renderer.spec.tsx
Outdated
Show resolved
Hide resolved
packages/cashier/src/pages/deposit/crypto-deposit/__tests__/crypto-deposit.spec.tsx
Outdated
Show resolved
Hide resolved
packages/cashier/src/pages/deposit/crypto-deposit/__tests__/crypto-deposit.spec.tsx
Show resolved
Hide resolved
…L-228/crypto-cashier-changes-for-third-party-processor-coinspaid
…L-228/crypto-cashier-changes-for-third-party-processor-coinspaid
packages/cashier/src/components/crypto-transactions-history/crypto-transactions-renderer.tsx
Outdated
Show resolved
Hide resolved
packages/cashier/src/components/crypto-transactions-history/crypto-transactions-renderer.tsx
Outdated
Show resolved
Hide resolved
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import { Icon, Text } from '@deriv/components'; | ||
import { Localize } from '@deriv/translations'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { Localize } from '@deriv/translations'; |
type TAlertBanner = { | ||
className?: string; | ||
icon: string; | ||
message: JSX.Element | string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
message: JSX.Element | string; | |
message: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heorhi-deriv suggested me to use <Localize />
component instead of the function as he pointed out that the function variant is used only for simple strings and not for dynamic data throughout the project.
packages/cashier/src/components/alert-banner/__tests__/alert-banner.spec.tsx
Outdated
Show resolved
Hide resolved
packages/cashier/src/pages/deposit/crypto-deposit/crypto-deposit.scss
Outdated
Show resolved
Hide resolved
packages/cashier/src/pages/deposit/crypto-deposit/__tests__/crypto-deposit.spec.tsx
Outdated
Show resolved
Hide resolved
packages/cashier/src/pages/deposit/crypto-deposit/__tests__/crypto-deposit.spec.tsx
Outdated
Show resolved
Hide resolved
packages/cashier/src/pages/deposit/crypto-deposit/__tests__/crypto-deposit.spec.tsx
Show resolved
Hide resolved
); | ||
|
||
expect(crypto_transactions_history_table_tooltip_mobile).toBeInTheDocument(); | ||
fireEvent.click(crypto_transactions_history_table_tooltip_mobile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fireEvent.click(crypto_transactions_history_table_tooltip_mobile); | |
userEvent.click(crypto_transactions_history_table_tooltip_mobile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@henry-deriv can you please provide a reason for using userEvent instead of fireEvent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
userEvent reflects user interaction better than fireEvent. Mimics a more realistic user interaction than fireEvent. Also, by convention we have stopped using fireEvent in our repo.
@@ -1,5 +1,6 @@ | |||
import React from 'react'; | |||
import { fireEvent, render, screen, waitFor } from '@testing-library/react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { fireEvent, render, screen, waitFor } from '@testing-library/react'; | |
import { render, screen, waitFor } from '@testing-library/react'; |
…L-228/crypto-cashier-changes-for-third-party-processor-coinspaid
…L-228/crypto-cashier-changes-for-third-party-processor-coinspaid
packages/cashier/src/components/alert-banner/__tests__/alert-banner.spec.tsx
Outdated
Show resolved
Hide resolved
…anner.spec.tsx Co-authored-by: Farzin Mirzaie <72082844+farzin-deriv@users.noreply.github.com>
…ird-party-processor-coinspaid
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
…id (binary-com#8343) * feat: Tooltip for crypto transactions processed by third-party payement processors * feat: Added popup note for mobile view for third-party payment tooltip * feat: added alert banner component in cashier package * feat: added IcAlertWarningDark icon * chore: working on test cases 1 * chore: reseting testcase to upstream/master * chore: added test case for tooltip in desktop mode * feat: AlertBanner for cryptoc with minimum deposit using third-party processor (CoinsPaid) * feat: changed styles for crypto-deposit.tsx * chore: added data-testid for tooltip in mobile view * chore: added test cases for crypto-deposit.tsx * chore: added test cases for crypto-deposit.tsx * fix: fixed the test cases for crypto-deposit.tsx * chore: made changes based on comments in PR * chore: fixing changes suggested by @heorhi-deriv * chore: updated alert-banner.tsx * refactor: changed the way localization is handled by alert-banner.tsx * chore: minor fixes * chore: removed unused classnames * chore: add test cases and made changes suggested by @nijil-deriv * chore: made changes for the comments in PR * Update packages/cashier/src/components/alert-banner/__tests__/alert-banner.spec.tsx Co-authored-by: Farzin Mirzaie <72082844+farzin-deriv@users.noreply.github.com> --------- Co-authored-by: Farzin Mirzaie <72082844+farzin-deriv@users.noreply.github.com>
Changes:
Please include a summary of the change and which issue is fixed below:
When you need to add unit test
When you need to add integration test
Test coverage checklist (for reviewer)
Type of change