Skip to content

Latest commit

 

History

History
300 lines (264 loc) · 21.9 KB

QA.md

File metadata and controls

300 lines (264 loc) · 21.9 KB

Test Sequence

These tests must be done in an Electron application. Some features might work on the web browser but show different behavior when using electron.

You can connect your wallet to the testnet (https://node1.foxtrot.testnet.hathor.network/v1a/) to run the tests.

  1. Wallet update

    1. [Using the old version of the wallet!] If your wallet is not initialized, initialize it.
    2. Close the wallet.
    3. Install the new version of Hathor Wallet.
    4. Open Hathor Wallet. It should be on lock screen.
    5. Unlock it and check that you transactions were loaded with correct balance (it's ok if there are no transactions).
    6. You may now reset your wallet.
  2. Initialization (you must be on Welcome screen)

    1. Close and open your wallet. You must still be on the Welcome screen.
    2. Try to click 'Get started' without selecting checkbox (must show error).
    3. Select the checkbox and click 'Get started'
    4. Choose Software Wallet.
    5. Start new wallet.
    6. Try to click 'Create my words' without selecting checkbox (must show error).
    7. Close and open your wallet. You must see the screen to select 'Hardware wallet' or 'Software wallet'. Select 'Software wallet' then 'new wallet' and then 'create my words'.
    8. Select to do backup now. (Really save those words, we will load this wallet later with them).
    9. Correctly select the first word but select a wrong one in the second. Check that it returns to the seed screen to restart the validation.
    10. Validate all the words correctly.
    11. Try to select insecure password (like '123'). It must show error.
    12. Select password and PIN.
  3. New token error

    1. Click on 'Custom tokens', then 'Create a new token'.
    2. Type 'Test token' in the token name, 'Test' in the symbol and 100 in the amount.
    3. Validates that the deposit required is 1.00 HTR.
    4. Try to create the token and receive an error that you don't have enough HTR.
  4. Wallet screen

    1. Copy the address and send 10.00 HTR from another wallet to this address.
    2. Check that the transaction appears in the list, the balance was updated and the address also changed.
    3. Click on 'See all addresses' and see the list. The address used to send the transaction should have 'Number of transactions' equal to 1.
    4. Copy this address and paste to search, validate it appears only one line on the table with the searched address.
    5. Click on 'Generate new address' and validate it has changed.
    6. Click on the 'QR Code', and copy the address to validate it really copied.
    7. Read the QRCode and validate it's the same as the written text.
    8. Download the QRCode and execute the same validation.
    9. Send another transaction to your address but with timelock.
    10. Validate that your balance is updated but the new tokens are locked.
  5. Lock/Unlock

    1. Click on the lock in the bottom left part of the screen, must go to the locked screen asking for the PIN.
    2. Try to unlock with a wrong PIN.
    3. Unlock it and check that you transactions were loaded with correct balance.
    4. Close Hathor Wallet.
    5. Open again and you should be on the lock screen.
    6. Unlock it and check that you transactions were loaded with correct balance.
  6. Transaction detail

    1. Click on the first transaction in the list.
    2. It should appear the transaction data with the output you received with the time until when it's locked.
    3. Click on the 'Back' link to go back to the main wallet screen.
  7. Create new token

    1. Click on 'Custom tokens', then 'Create a new token'.
    2. Create a token 'Test Token', 'TST', amount 100.
    3. Validate its symbol appeared selected in the token bar.
    4. The list of transactions should have only one, with type 'Token creation' and amount of 100.00.
    5. Click on the HTR token (in the token bar) and check if the first transaction is of type 'Token deposit' with amount of 1.00.
  8. Transaction detail

    1. Click on the transaction that has the token deposit (this is the transaction responsible for creating the new token).
    2. Validate it has an input of HTR, an output of the total amount created for the new token, a mint and melt authority output and it might have a change HTR output (depending on the input spent).
    3. Validate it has the new created token in the token list.
    4. Validate that all the inputs and outputs from this transaction are from/to addresses that belong to your wallet by checking the "Your address" tag
    5. Click on the token uid and should redirect to the wallet main screen with TST selected.
    6. Send 0.01 HTR to the address WZ7pDnkPnxbs14GHdUFivFzPbzitwNtvZo
    7. Click on the sent transaction and validate that the 0.01 HTR output does not have the "Your address" tag and that the input and the change output do have
  9. Send tokens

    1. Copy the address.
    2. Click on 'Send tokens'.
    3. Send an amount of HTR and TST to the copied address.
    4. Go back to the main screen and see the transactions list
    5. The first transaction on the list must have amount 0.00 (for both HTR and TST).
    6. Click on this transaction and check that it has inputs and outputs for both tokens. And TST must be on the token list.
  10. Unregister TST

    1. Click on the TST uid to redirect to the main screen.
    2. Click on the trash icon besides the name to unregister the token.
  11. Transaction detail

    1. It should be on the main screen with the HTR selected. Click on the first transaction.
    2. The token list now has a warning that TST is not registered.
    3. Click on the uid and register it.
  12. Register in the 'Custom tokens' screen

    1. Click on 'About Test Token' tab.
    2. Validate that all informations are correct (name, symbol, supply) and copy the configuration string.
    3. Unregister the token TST.
    4. Click on 'Custom tokens', then 'Register token'.
    5. Register the token with the copied string.
    6. Click on the 'Back' link.
  13. Register in the 'number' in the token bar

    1. Unregister the token again.
    2. Click on the purple circle on the token token bar with the number 1.
    3. Click on the 'Show history' and see the transactions of the TST token.
    4. Click on 'Register tokens' and register it again with the copied configuration string.
  14. Administrative tools

    1. Go back to the wallet main screen and select TST token.
    2. Click on 'Administrative Tools' tab.
    3. Total supply and your balance should be 100.00 and you must have 1 mint output and 1 melt output.
    4. Click to mint tokens.
    5. Try to mint 10,000.00. It must show an error that you don't have enough HTR for the deposit.
    6. Mint 50.00 new tokens. The total supply and your balance must be 150.00 now.
    7. Click to melt tokens.
    8. Try to melt 200.00 TST. It must show and error that you don't have this amount to melt.
    9. Melt 20.00 tokens. The total supply and your balance must be 130.00 now.
    10. Click on 'Balance & History' and copy your address. Then go back to 'Administrative Tools' and click to delegate mint.
    11. Type your address and delegate. Now you must have 2 mint outputs.
    12. Click to delegate melt and deselect the option to 'Create another melt output for you?'. Delegate the authority to the address WZ7pDnkPnxbs14GHdUFivFzPbzitwNtvZo and now you must have no melt outputs.
    13. Go back to the 'Administrative Tools', click to destroy mint and select 3. You must see an error message that you don't have 3 mint authority outputs.
    14. Select 2 and complete the destroy. You must see a message saying 'You have no more authority outputs for this token'.
    15. Go to 'About TST' tab and must see 'Can mint new tokens: No'.
  15. Hide Zero-balance tokens

    1. Go to 'Custom Tokens', then 'Register token'
    2. Enter the following string: (assuming you are on testnet. If not, create a custom token in another wallet for this test.)
      [Hiding Token Test:HIDET:009f4365268aa3083c3bbdabae377fbbf720604e132b58602f6572cf45af8bd5:43f57655]
    3. Go back to the Main screen and check the the token HIDET is now available on the token bar to the left.
    4. Navigate to 'Settings', on the option 'Hide zero-balance tokens', and select 'Change'.
    5. Confirm that you want to hide zero-balance tokens.
    6. Navigate back to the tokens screen and check that the token HIDET is no longer on the token bar to the left.
    7. Navigate to 'Settings' and de-select the option to 'Hide zero-balance tokens'.
    8. Navigate back to the tokens screen and check that the token HIDET is being shown again.
  16. Always show tokens

    1. Unregister the token HIDET
    2. Activate the 'Hide zero-balance tokens' setting on the Settings page
    3. Go to 'Custom Tokens', then 'Register token' and enter once again the HIDET configuration string from above
    4. A message must be shown on screen alerting that you do not have balance on this token.
    5. This message must also ask if you want to always show this token despite the 'Hide zero-balance tokens' being active
    6. Select the 'Always show' option and register the token.
    7. Navigate to the main screen and check that the HIDET token is being shown.
    8. Go to the 'About' tab. A line must be informing that the token is always being shown.
    9. This line also contains a link to change this setting for this token. Click it.
    10. Confirm that you do not want to always show this token.
    11. Navigate to the HTR token using the bar on the left.
    12. Check that the HIDET token is no longer being shown on this bar.
    13. Go to the 'Settings' screen and de-activate the 'Hide zero-balance tokens' setting
    14. Navigate back to the main screen and check that the HIDET token is being displayed again on the token bar.
  17. Token bar scroll

    1. You should have 3 tokens in your token bar, if you need more you can register the following one:
      [Test Coin:TSC:001c382847d8440d05da95420bee2ebeb32bc437f82a9ae47b0745c8a29a7b0d:036e4b2d]
    2. Reduce the height of your screen and you must see a scroll in the tokens.
    3. You must continue seeing the lock/settings icons as usual.
  18. Change server

    1. Click on the 'Wallet' navigation link, then on the settings icon and the on 'Change server'.
    2. Select one of the default servers and connect. It will connect to the mainnet.
    3. The transaction list must be empty.
    4. Go back, change again to the testnet server. Before loading the wallet it must ask to confirm that you want to connect to a testnet. Check that all transactions load again.
  19. Add passphrase

    1. Click on the settings icon and then 'Set a passphrase'.
    2. Choose any passphrase and confirm it. It must show an empty list again.
    3. Go back to the passprase screen and now select 'I want to set a blank passphrase.' and confirm it. All transactions must appear again.
  20. Notifications and bug report

    1. Click on the settings icon and 'Change' link on the 'Allow notifications' option. Click to change and see that now it's 'No'.
    2. Do the same with the bug report to validate it's changing.
  21. Reload wallet

    1. Turn wifi off until the status change to 'Offline'.
    2. Turn on wifi and check if status change to 'Online' again and the wallet reload the transactions.
    3. Click on 'Reset all data' and confirm it.
    4. Now load the wallet with the saved words. All transactions must appear normally.
  22. Register tokens with same name

    1. Unregister TST token but copy its configuration string and save it.
    2. Click on 'Custom tokens' and then 'Create a new token'.
    3. Type 'Test token' in the token name, 'test' in the symbol and 200 in the amount.
    4. Now click on 'Custom tokens', then 'Register a token'.
    5. Type 'abc'. It should show an error of invalid configuration string.
    6. Type the configuration string saved in the first step. It must appear an error that you already have a token with this name.
  23. Try to spend same output

    1. Click on 'Wallet' in the navigation bar, select the HTR token and copy the address (and save it).
    2. Click on the first transaction with amount 0.00.
    3. Copy the first input from HTR and from your address (copy the transaction ID and the index).
    4. Click on 'Send tokens'.
    5. Paste the address and 1.00 as the amount. Deselect 'Choose inputs automatically' and paste the transaction ID and index copied before.
    6. Must see an error that the output is already spent.
  24. Create NFT

    1. Click on 'Custom tokens', then 'Create an NFT'.
    2. Fill NFT data as ipfs://test, name and symbol as 'NFT Test' and 'NFTT', and amount as 100. Check only the melt authority checkbox.
    3. Double check the Fee is 0.01 HTR, the deposit is 0.01 HTR and the Total is 0.02 HTR.
    4. Create the NFT and open the transaction on the list.
    5. Validate that the first output is the data output showing ipfs://test [Data] with 0.01 HTR and there is one output with 1.00 of tokens, one output with the melt authority and possibly one change output of HTR.
  25. Late backup

    1. Reset the wallet and close it.
    2. Open the wallet with the parameters --unsafe-mode --debug (see the README.md under "Debug mode on installed app" to understand how).
    3. Click on the application menu Debug > Open Dev Tools. Then type localStorage.clear(). This is to simulate a fresh install of the app.
    4. Close and open the wallet again and start a new wallet one without doing backup. It must show a yellow warning saying a backup must be done.
    5. Do the backup (following procedures in the 'Initialization' tests). The backup message has to disappear.
  26. Reset menu

    1. Click on the application menu Debug > Reset all data. Then fill the form with "anything" and click on the "Reset all data" button.
    2. Check that a message with "Invalid value." appears.
    3. Click on "Cancel", the modal should close.
    4. Click on the application menu Debug > Reset all data. Then fill the form with "I want to reset my wallet" and click on the "Reset all data" button. The wallet should close.
    5. Open the wallet again, it should open the Welcome screen. Do NOT click on "Get started".
    6. Close the wallet.
  27. Hardware wallet migration

    1. Uninstall the wallet and install the previous version.
    2. Connect your Ledger device to the computer. The Ledger should be initialized already.
    3. Start the wallet with the Ledger device and copy the current address.
    4. Close the wallet and install the latest version.
  28. Hardware wallet initialization

    1. Connect your Ledger device to the computer. The Ledger should be initialized already.
    2. Open the Hathor app on Ledger.
    3. On the desktop wallet, mark the checkbox and click 'Get Started'.
    4. Choose 'Hardware Wallet'.
    5. Wallet should go through both steps and show 'Step 1/2' and 'Step 2/2'.
    6. On your Ledger, check it is requesting your authorization.
    7. Deny the authorization request on Ledger (scroll with left or right and click both buttons on "Reject" step). It should show an error on the wallet.
    8. Click 'Try again'. It goes through both steps and asks for authorization again.
    9. Grant authorization request (click both buttons on the "Approve" step). It will proceed to 'Loading transactions' screen.
    10. Once the wallet is loaded check that the current address match the copied address during "Hardware wallet migration"
  29. Ledger wallet screen

    1. On the main wallet screen, confirm 'Address to receive tokens' is truncated (eg: 'HGZmqThwa6...'). There should be a 'Show full address' button next to it.
    2. Confirm there's no QR Code button under the truncated address.
    3. Click on 'Show full address'. A modal will display asking you to compare the address on the wallet and on Ledger.
    4. Check that the modal cannot be closed, not even by clicking outside it.
    5. Confirm that both addresses (on wallet and Ledger) are the same. Copy this address on the computed.
    6. On the Ledger click both buttons on the "Approve" step. Modal should close.
    7. Send 10.00 HTR from another wallet to the copied address.
    8. Check that the transaction appears in the list, the balance was updated and the address also changed.
    9. Click on 'Generate new address' and validate it has changed.
    10. Confirm again address on the wallet and on Ledger (by clicking 'Show full address').
  30. Ledger custom token wallet screen

    1. On the main wallet screen get another address and send any amount of a custom token to this address.
    2. Register the token and go to the token wallet screen.
    3. Check that there is a key icon next to it's name and click the key icon.
    4. A modal should appear, confirm that the token symbol, name and uid are correct.
    5. Click the "Sign token" button and check the Ledger device, it should say "Confirm token data".
    6. Confirm that the symbol, name and uid are correct (use buttons to scroll).
    7. Click both buttons on the "Reject" step and check that an error message "User denied token on Ledger" appears on the wallet.
    8. Try to sign the token again but this time click both buttons on the "Accept" step, a success message should show on the wallet.
    9. After closing the modal, check that that the key icon is now an unclicable checkmark icon and hovering shows the message "Token signed with Ledger".
  31. Ledger reset token signature

    1. Go to settings and click the button "Untrust all tokens on Ledger".
    2. Read the message and click "Start", the device should show "Reset token signatures".
    3. Click both buttons on the "Reject" step and check that an error message appears on the wallet.
    4. Click the "Try again" button and this time click both buttons on the "Approve" step.
    5. Go to the token wallet screen and check that the checkmark icon is back to a key icon.
  32. Ledger send tokens

    1. On the wallet screen copy 2 different addresses from your wallet.
    2. Click on 'Send tokens' on the top menu.
    3. Confirm that the token dropdown list can be clicked and show all tokens.
    4. Confirm the Timelock checkbox is disabled.
    5. Try sending a transaction to an invalid address. An error message should show up on the wallet. Nothing should be displayed on Ledger.
    6. Try sending a transaction with an amount bigger than the one you have. An error message should show up on the wallet. Nothing should be displayed on Ledger.
    7. Send HTR tokens to both copied addresses in the same transaction (2 outputs). A modal will be displayed asking to confirm operation on Ledger.
    8. On Ledger, it should show 'Output 1/2' on the first step the address on the second and the amount on the third step (steps being from left to right), then an "Approve" and "Reject" steps. After clicking both buttons on the "Approve", it shows 'Output 2/2' and the other output (address and ammount).
    9. Clicking both buttons on the "Approve" step one more time will display the confirmation screen. Reject signing the transaction. The modal will hide and an error message should appear on the wallet.
    10. Click to send the transaction again. This time, approve it on the signing screen. Ledger screen will show 'Processing' for a while and the desktop wallet will display the modal while solving proof of work.
    11. After transaction is completed, it closes the modal and goes back to main wallet screen. The first transaction on the list must have value 0.00.
    12. Go to the custom token wallet page and confirm that the key icon is showing next to the name (and not a checkmark).
    13. If there is a checkmark icon, go to settings and untrust all tokens.
    14. Click on 'Send tokens' on the top menu again.
    15. Change the token dropdown to the custom token and try to send any amount. A modal will be displayed saying there are unverified custom tokens and the list should have the custom token added to the transaction.
    16. Go to the custom token wallet screen and sign the custom token with Ledger (key icon next to the name).
    17. Go back to the 'Send tokens' screen and click on 'Add another token' button and send HTR to an address and the custom token to the second copied address. Make sure both amounts are less than the balance available. A modal will be displayed asking to confirm operation on Ledger.
    18. On Ledger you should check that each token is being sent to the correct address then click both buttons on the 'Approve' screen.
    19. After transaction is completed, it closes the modal and goes back to main wallet screen. The first transaction on the list must have value 0.00.
    20. Click on the first transaction and confirm that it has 4 outputs. The extra 2 outputs are change outputs and should be marked with 'Your address'.
    21. Close the wallet and open it again, check the custom token screen of the token used on the last transaction. Make sure that there is a checkmark icon next to the token name.
  33. Ledger misc

    1. Go to the settings screen.
    2. Click on change server. The usual Change Server screen should show up, but with no PIN field. Change to a new server.
    3. On the settings screen, click on 'Set a passphrase'. It should show a modal saying the action is not supported and it should be done directly on Ledger.
    4. Go to Custom Tokens on the top navigation bar. Clicking 'Create a new token' should display a modal saying action is not supported.
    5. Now click on 'Create an NFT' and should display a modal saying action is not supported.
    6. Lock wallet. It should go the screen asking to select the wallet type (software or hardware).
    7. Choose 'Hardware Wallet' and go through the same process again.
    8. When finished loading the wallet, it should show the same balance and transactions as before locking.
  34. Ledger connection

    1. On Ledger, quit the Hathor app. The desktop wallet should lock (go to wallet type screen). This does not happen instantly.
    2. Without opening the Hathor app on Ledger, click 'Hardware wallet'. Desktop wallet will stay on 'Step 1/2'.
    3. Open the Hathor app on Ledger. Wallet should go to 'Step 2/2' after a few seconds and ask for authorization on Ledger.