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

e2e Test - receive #366

Merged
merged 3 commits into from
Aug 8, 2021
Merged

e2e Test - receive #366

merged 3 commits into from
Aug 8, 2021

Conversation

izzycsy
Copy link
Contributor

@izzycsy izzycsy commented Jul 29, 2021

What kind of PR is this?:

/kind chore

What this PR does / why we need it:

• Added test for Balances/Receive

Which issue(s) does this PR fixes?:

Fixes #355

Additional comments?:

@codeclimate
Copy link

codeclimate bot commented Jul 29, 2021

Code Climate has analyzed commit 493ba63 and detected 0 issues on this pull request.

View more on Code Climate.

@defichain-bot
Copy link
Contributor

Missing Translations Report

The following translations are missing for this pull request.

View Full Report
{
    "zh-Hans": {
        "missingCount": 135,
        "labels": {
            "screens/OceanInterface": [
                "Transaction Sent",
                "title",
                "An error has occurred",
                "OK"
            ],
            "components/BarCodeScanner": [
                "Requesting for camera permission",
                "You have denied the permission request to use your camera"
            ],
            "screens/OnboardingCarousel": [
                "DeFiChain",
                "Wallet",
                "A wallet dedicated to the native decentralized finance for bitcoin.",
                "title",
                "subtitle"
            ],
            "screens/RestoreWallet": [
                "Error",
                "The recovery words you have entered are invalid. Please double check and try again.",
                "Please provide your 24 recovery words to regain access to your wallet.",
                "ENTER THE CORRECT WORD",
                "RECOVER WALLET"
            ],
            "screens/SendScreen": [
                "`Enter word #${order}`",
                "CONTINUE",
                "Sending",
                "Transaction fee",
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "screens/Onboarding": [
                "CREATE A WALLET",
                "RESTORE WALLET"
            ],
            "screens/GuidelinesRecoveryWords": [
                "What are recovery words?",
                "'Your unique 24 recovery words is a human-readable representation of your wallet private key",
                "'You will need your recovery words to restore your wallet on",
                "'If you lose your recovery words",
                "'It is important that you write down your recovery words legibly and in the correct order. Store your recovery words safely and securely"
            ],
            "screens/Guidelines": [
                "Creating a wallet",
                "'Before you create a wallet",
                "Learn more about recovery words",
                "g.title",
                "g.subtitle",
                "'I understand it is my responsibility to keep my recovery words secure",
                "SHOW MY 24 RECOVERY WORDS"
            ],
            "screens/WalletNavigator": [
                "Guidelines",
                "Learn More",
                "Display recovery words",
                "Verify words",
                "Recover Wallet"
            ],
            "screens/LoadingScreen": [
                "Loading"
            ],
            "screens/ErrorBoundary": [
                "Something went wrong",
                "The app ran into a problem and could not recover. Please restart your application."
            ],
            "screens/TransactionDetailScreen": [
                "tx.desc)",
                "tx.amount)",
                "`${tx.block}`)",
                "tx.txid"
            ],
            "screens/TransactionsScreen": [
                "desc",
                "block",
                "LOAD MORE",
                "Transactions",
                "No transactions yet",
                "Start transacting with your wallet. All transactions made will be displayed here.",
                "RECEIVE COINS"
            ],
            "screens/TransactionsDetailScreen": [
                "Transaction"
            ],
            "screens/CommunityScreen": [
                "Connect with the community:",
                "DeFiChain is a community-driven and open project.",
                "The DeFiChain Foundation does not provide direct support.",
                "title",
                "Community"
            ],
            "screens/Settings": [
                "NETWORK",
                "Are you sure you want to unlink your wallet?",
                "You will need to use your recovery words the next time you want to get back to your wallet.",
                "Cancel",
                "Unlink Wallet",
                "UNLINK WALLET"
            ],
            "screens/SettingsNavigator": [
                "Settings"
            ],
            "screens/PoolSwapScreen": [
                "From",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee",
                "Swapping Token"
            ],
            "screens/DexScreen": [
                "YOUR LIQUIDITY",
                "'Pick a pool pair below",
                "section.key",
                "Decentralized Exchange",
                "Add Liquidity",
                "Remove Liquidity"
            ],
            "screens/RemoveLiquidity": [
                "Amount of liquidity to remove",
                "Removing Liquidity"
            ],
            "screens/AddLiquidity": [
                "Price",
                "`Token ${props.type === 'primary' ? 'A' : 'B'}`",
                "Balance",
                "MAX",
                "per",
                "Share of pool",
                "Pooled "
            ],
            "components/slider": [
                "None"
            ],
            "components": [
                "All"
            ],
            "components/Button": [
                "CONTINUE"
            ],
            "screens/ConfirmAddLiq": [
                "Adding",
                "Fee",
                "Price",
                "Liquidity tokens received",
                "Share of pool",
                "Pooled"
            ],
            "screens/ConfirmLiquidity": [
                "CONFIRM",
                "Adding Liquidity"
            ],
            "screens/TokensVsUtxoScreen": [
                "'DFI exists in two forms – UTXO and token",
                "'UTXO DFI is the main form DFI and is used for core cryptocurrency purposes like send",
                "Your DFI balance includes both UTXO and tokens.",
                "label",
                "props.label"
            ],
            "screens/TokenDetailScreen": [
                "AMOUNT BALANCE",
                "AVAILABLE OPTIONS",
                "Send to other wallet",
                "Receive",
                "Convert"
            ],
            "screens/ReceiveScreen": [
                "Use this address to receive DFI or any DST",
                "Copy",
                "Wallet Receive"
            ],
            "screens/ConvertScreen": [
                "PREVIEW CONVERSION",
                "\"Tokens vs UTXO",
                "Converting DFI",
                "Convert DFIs",
                "Scan recipient QR",
                "Tokens vs UTXO"
            ],
            "screens/Convert": [
                "titlePrefix",
                "Balance"
            ],
            "components/max": [
                "MAX"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 135
    },
    "zh-Hant": {
        "missingCount": 134,
        "labels": {
            "screens/OceanInterface": [
                "Transaction Sent",
                "title",
                "An error has occurred",
                "OK"
            ],
            "components/BarCodeScanner": [
                "Requesting for camera permission",
                "You have denied the permission request to use your camera"
            ],
            "screens/OnboardingCarousel": [
                "DeFiChain",
                "Wallet",
                "A wallet dedicated to the native decentralized finance for bitcoin.",
                "title",
                "subtitle"
            ],
            "screens/RestoreWallet": [
                "Error",
                "The recovery words you have entered are invalid. Please double check and try again.",
                "Please provide your 24 recovery words to regain access to your wallet.",
                "ENTER THE CORRECT WORD",
                "RECOVER WALLET"
            ],
            "screens/SendScreen": [
                "`Enter word #${order}`",
                "CONTINUE",
                "Sending",
                "Transaction fee",
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "screens/Onboarding": [
                "CREATE A WALLET",
                "RESTORE WALLET"
            ],
            "screens/GuidelinesRecoveryWords": [
                "What are recovery words?",
                "'Your unique 24 recovery words is a human-readable representation of your wallet private key",
                "'You will need your recovery words to restore your wallet on",
                "'If you lose your recovery words",
                "'It is important that you write down your recovery words legibly and in the correct order. Store your recovery words safely and securely"
            ],
            "screens/Guidelines": [
                "Creating a wallet",
                "'Before you create a wallet",
                "Learn more about recovery words",
                "g.title",
                "g.subtitle",
                "'I understand it is my responsibility to keep my recovery words secure",
                "SHOW MY 24 RECOVERY WORDS"
            ],
            "screens/WalletNavigator": [
                "Guidelines",
                "Learn More",
                "Display recovery words",
                "Verify words",
                "Recover Wallet"
            ],
            "screens/LoadingScreen": [
                "Loading"
            ],
            "screens/ErrorBoundary": [
                "Something went wrong",
                "The app ran into a problem and could not recover. Please restart your application."
            ],
            "screens/TransactionDetailScreen": [
                "tx.desc)",
                "tx.amount)",
                "`${tx.block}`)",
                "tx.txid"
            ],
            "screens/TransactionsScreen": [
                "desc",
                "block",
                "LOAD MORE",
                "No transactions yet",
                "Start transacting with your wallet. All transactions made will be displayed here.",
                "RECEIVE COINS"
            ],
            "screens/TransactionsDetailScreen": [
                "Transaction"
            ],
            "screens/CommunityScreen": [
                "Connect with the community:",
                "DeFiChain is a community-driven and open project.",
                "The DeFiChain Foundation does not provide direct support.",
                "title",
                "Community"
            ],
            "screens/Settings": [
                "NETWORK",
                "Are you sure you want to unlink your wallet?",
                "You will need to use your recovery words the next time you want to get back to your wallet.",
                "Cancel",
                "Unlink Wallet",
                "UNLINK WALLET"
            ],
            "screens/SettingsNavigator": [
                "Settings"
            ],
            "screens/PoolSwapScreen": [
                "From",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee",
                "Swapping Token"
            ],
            "screens/DexScreen": [
                "YOUR LIQUIDITY",
                "'Pick a pool pair below",
                "section.key",
                "Decentralized Exchange",
                "Add Liquidity",
                "Remove Liquidity"
            ],
            "screens/RemoveLiquidity": [
                "Amount of liquidity to remove",
                "Removing Liquidity"
            ],
            "screens/AddLiquidity": [
                "Price",
                "`Token ${props.type === 'primary' ? 'A' : 'B'}`",
                "Balance",
                "MAX",
                "per",
                "Share of pool",
                "Pooled "
            ],
            "components/slider": [
                "None"
            ],
            "components": [
                "All"
            ],
            "components/Button": [
                "CONTINUE"
            ],
            "screens/ConfirmAddLiq": [
                "Adding",
                "Fee",
                "Price",
                "Liquidity tokens received",
                "Share of pool",
                "Pooled"
            ],
            "screens/ConfirmLiquidity": [
                "CONFIRM",
                "Adding Liquidity"
            ],
            "screens/TokensVsUtxoScreen": [
                "'DFI exists in two forms – UTXO and token",
                "'UTXO DFI is the main form DFI and is used for core cryptocurrency purposes like send",
                "Your DFI balance includes both UTXO and tokens.",
                "label",
                "props.label"
            ],
            "screens/TokenDetailScreen": [
                "AMOUNT BALANCE",
                "AVAILABLE OPTIONS",
                "Send to other wallet",
                "Receive",
                "Convert"
            ],
            "screens/ReceiveScreen": [
                "Use this address to receive DFI or any DST",
                "Copy",
                "Wallet Receive"
            ],
            "screens/ConvertScreen": [
                "PREVIEW CONVERSION",
                "\"Tokens vs UTXO",
                "Converting DFI",
                "Convert DFIs",
                "Scan recipient QR",
                "Tokens vs UTXO"
            ],
            "screens/Convert": [
                "titlePrefix",
                "Balance"
            ],
            "components/max": [
                "MAX"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 135
    },
    "de": {
        "missingCount": 134,
        "labels": {
            "screens/OceanInterface": [
                "Transaction Sent",
                "title",
                "An error has occurred",
                "OK"
            ],
            "components/BarCodeScanner": [
                "Requesting for camera permission",
                "You have denied the permission request to use your camera"
            ],
            "screens/OnboardingCarousel": [
                "DeFiChain",
                "Wallet",
                "A wallet dedicated to the native decentralized finance for bitcoin.",
                "title",
                "subtitle"
            ],
            "screens/RestoreWallet": [
                "Error",
                "The recovery words you have entered are invalid. Please double check and try again.",
                "Please provide your 24 recovery words to regain access to your wallet.",
                "ENTER THE CORRECT WORD",
                "RECOVER WALLET"
            ],
            "screens/SendScreen": [
                "`Enter word #${order}`",
                "CONTINUE",
                "Sending",
                "Transaction fee",
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "screens/Onboarding": [
                "CREATE A WALLET",
                "RESTORE WALLET"
            ],
            "screens/GuidelinesRecoveryWords": [
                "What are recovery words?",
                "'Your unique 24 recovery words is a human-readable representation of your wallet private key",
                "'You will need your recovery words to restore your wallet on",
                "'If you lose your recovery words",
                "'It is important that you write down your recovery words legibly and in the correct order. Store your recovery words safely and securely"
            ],
            "screens/Guidelines": [
                "Creating a wallet",
                "'Before you create a wallet",
                "Learn more about recovery words",
                "g.title",
                "g.subtitle",
                "'I understand it is my responsibility to keep my recovery words secure",
                "SHOW MY 24 RECOVERY WORDS"
            ],
            "screens/WalletNavigator": [
                "Guidelines",
                "Learn More",
                "Display recovery words",
                "Verify words",
                "Recover Wallet"
            ],
            "screens/LoadingScreen": [
                "Loading"
            ],
            "screens/ErrorBoundary": [
                "Something went wrong",
                "The app ran into a problem and could not recover. Please restart your application."
            ],
            "screens/TransactionDetailScreen": [
                "tx.desc)",
                "tx.amount)",
                "`${tx.block}`)",
                "tx.txid"
            ],
            "screens/TransactionsScreen": [
                "desc",
                "block",
                "LOAD MORE",
                "No transactions yet",
                "Start transacting with your wallet. All transactions made will be displayed here.",
                "RECEIVE COINS"
            ],
            "screens/TransactionsDetailScreen": [
                "Transaction"
            ],
            "screens/CommunityScreen": [
                "Connect with the community:",
                "DeFiChain is a community-driven and open project.",
                "The DeFiChain Foundation does not provide direct support.",
                "title",
                "Community"
            ],
            "screens/Settings": [
                "NETWORK",
                "Are you sure you want to unlink your wallet?",
                "You will need to use your recovery words the next time you want to get back to your wallet.",
                "Cancel",
                "Unlink Wallet",
                "UNLINK WALLET"
            ],
            "screens/SettingsNavigator": [
                "Settings"
            ],
            "screens/PoolSwapScreen": [
                "From",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee",
                "Swapping Token"
            ],
            "screens/DexScreen": [
                "YOUR LIQUIDITY",
                "'Pick a pool pair below",
                "section.key",
                "Decentralized Exchange",
                "Add Liquidity",
                "Remove Liquidity"
            ],
            "screens/RemoveLiquidity": [
                "Amount of liquidity to remove",
                "Removing Liquidity"
            ],
            "screens/AddLiquidity": [
                "Price",
                "`Token ${props.type === 'primary' ? 'A' : 'B'}`",
                "Balance",
                "MAX",
                "per",
                "Share of pool",
                "Pooled "
            ],
            "components/slider": [
                "None"
            ],
            "components": [
                "All"
            ],
            "components/Button": [
                "CONTINUE"
            ],
            "screens/ConfirmAddLiq": [
                "Adding",
                "Fee",
                "Price",
                "Liquidity tokens received",
                "Share of pool",
                "Pooled"
            ],
            "screens/ConfirmLiquidity": [
                "CONFIRM",
                "Adding Liquidity"
            ],
            "screens/TokensVsUtxoScreen": [
                "'DFI exists in two forms – UTXO and token",
                "'UTXO DFI is the main form DFI and is used for core cryptocurrency purposes like send",
                "Your DFI balance includes both UTXO and tokens.",
                "label",
                "props.label"
            ],
            "screens/TokenDetailScreen": [
                "AMOUNT BALANCE",
                "AVAILABLE OPTIONS",
                "Send to other wallet",
                "Receive",
                "Convert"
            ],
            "screens/ReceiveScreen": [
                "Use this address to receive DFI or any DST",
                "Copy",
                "Wallet Receive"
            ],
            "screens/ConvertScreen": [
                "PREVIEW CONVERSION",
                "\"Tokens vs UTXO",
                "Converting DFI",
                "Convert DFIs",
                "Scan recipient QR",
                "Tokens vs UTXO"
            ],
            "screens/Convert": [
                "titlePrefix",
                "Balance"
            ],
            "components/max": [
                "MAX"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 135
    }
}

@netlify
Copy link

netlify bot commented Jul 29, 2021

✔️ Deploy Preview for defi-wallet ready!

🔨 Explore the source changes: 493ba63

🔍 Inspect the deploy log: https://app.netlify.com/sites/defi-wallet/deploys/610f69b87a14320007dd622d

😎 Browse the preview: https://deploy-preview-366--defi-wallet.netlify.app

@codecov
Copy link

codecov bot commented Jul 29, 2021

Codecov Report

Merging #366 (493ba63) into main (81e26d9) will decrease coverage by 61.87%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main     #366       +/-   ##
===========================================
- Coverage   86.54%   24.67%   -61.88%     
===========================================
  Files         111      103        -8     
  Lines        1866     1763      -103     
  Branches      299      290        -9     
===========================================
- Hits         1615      435     -1180     
- Misses        250     1326     +1076     
- Partials        1        2        +1     
Impacted Files Coverage Δ
app/store/index.ts 0.00% <0.00%> (-100.00%) ⬇️
app/screens/RootNavigator.tsx 0.00% <0.00%> (-100.00%) ⬇️
app/api/storage/provider/provider.ts 0.00% <0.00%> (-100.00%) ⬇️
app/contexts/WalletStoreProvider.tsx 0.00% <0.00%> (-100.00%) ⬇️
app/screens/WalletNavigator/screens/Onboarding.tsx 0.00% <0.00%> (-100.00%) ⬇️
...lletNavigator/screens/CreateWallet/PinCreation.tsx 0.00% <0.00%> (-100.00%) ⬇️
...tor/screens/Transactions/screens/stateProcessor.ts 0.00% <0.00%> (-100.00%) ⬇️
...ator/screens/CreateWallet/CreateMnemonicWallet.tsx 0.00% <0.00%> (-100.00%) ⬇️
...or/screens/RestoreWallet/RestoreMnemonicWallet.tsx 0.00% <0.00%> (-100.00%) ⬇️
...reens/AppNavigator/screens/Dex/DexAddLiquidity.tsx 0.00% <0.00%> (-98.49%) ⬇️
... and 52 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81e26d9...493ba63. Read the comment docs.

@defichain-bot
Copy link
Contributor

defichain-bot commented Jul 29, 2021

Build preview for DeFi Wallet is ready!

Built with commit d6c6f03

https://expo.io/@defichain/wallet?release-channel=pr-preview-366

@cypress
Copy link

cypress bot commented Jul 29, 2021



Test summary

167 0 0 0


Run details

Project wallet
Status Passed
Commit d6c6f03 ℹ️
Started Aug 8, 2021 5:23 AM
Ended Aug 8, 2021 5:37 AM
Duration 13:36 💡
OS Linux Ubuntu - 20.04
Browser Chrome 92

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@fuxingloh fuxingloh requested a review from kyleleow July 30, 2021 04:21
@thedoublejay thedoublejay marked this pull request as draft August 1, 2021 05:59
@thedoublejay
Copy link
Member

Need to add the following test scenarios:

  1. Get the address generated in Receive Page
  2. Add any amount and input the address on the Send page - Address field
  3. It should trigger an address validation that will enable the submit button

@thedoublejay thedoublejay marked this pull request as ready for review August 8, 2021 05:21
@thedoublejay thedoublejay enabled auto-merge (squash) August 8, 2021 05:21
@thedoublejay thedoublejay merged commit 71e05dd into main Aug 8, 2021
@thedoublejay thedoublejay deleted the izzy/test_receive branch August 8, 2021 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/e2e kind/chore Non feature change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

receive - e2e tests
3 participants