Skip to content

Commit

Permalink
test: add scenario for personal sign using hardware wallet (#23314)
Browse files Browse the repository at this point in the history
## **Description**
In this PR we add the scenario for the flow: eth sign with hardware
wallet.
This task belongs to the effort of documenting manual QA flows[ in this
Epic](#21962).


[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/23314?quickstart=1)

## **Related issues**

Fixes: #22027 

## **Manual testing steps**

1. Check the video below.

## **Screenshots/Recordings**
Performing the steps defined in the scenario


https://github.com/MetaMask/metamask-extension/assets/44811/ed18a2d7-7862-481f-aa7c-bb3d011fc440

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained what problem this PR is solving and how it
is solved.
- [x] I've linked related issues
- [x] I've included manual testing steps
- [x] I've included screenshots/recordings if applicable
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
segun authored Mar 14, 2024
1 parent 72e8512 commit 9dfde3b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/scenarios/13. sign/personal sign with hardware wallet.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Steps,Test Steps,Preconditions,Test Data,Expected Result,Notes
1,Open the extension.,,,The Welcome Back screen is shown.,
2,Proceed to unlock the wallet.,,password (8 characters min).,"The Ether balance is shown on the overview. The wallet address is shown on the overview.",
3,"Click on account menu icon. Click ""Add account or hardware wallet"".",,,"The ""Add account"" modal is shown.",
4,"On ""Add account"" modal, click ""Add hardware wallet"" button.",,,"""Connect a hardware wallet"" screen is shown. User can choose between different options to connect a hardware: Ledger, Trezor, Lattice, or QR-based. ""Continue"" button is disabled.",
5,Choose an option to connect hardware wallet.,We need to have a hardware wallet set up to test this functionality.,"e.g. choose ""Ledger""","""Continue"" button is enabled.",
6,"Plug the hardware wallet directly into computer, then unlock it.",,Password for hardware wallet,"Hardware wallet is detected by MetaMask. ""Select an account"" screen is shown on MetaMask, accounts on hardware wallet are shown on this screen.","If you use Ledger, you need to open the Ethereum app on Ledger. If you use Trezor, make sure you use the correct passphrase."
7,"Choose one or multiples accounts that user wants to connect. Then click ""Unlock"".",,,,
8,Click account menu icon to open accounts list.,,,"In accounts list, all selected hardware wallet accounts are shown, and they are all flagged with harware wallet name to be distinguished from other accounts.",
9,Select one hardware wallet account.,,,"The Ether balance for the selected hardware wallet account is shown on the overview. The selected account address is shown on the overview.",
10,Open the test dapp in another tab.,,https://metamask.github.io/test-dapp/,,
11,Click Connect.,,,"The MetaMask popup is opened with the Connect with MetaMask screen displayed. Your imported hardware wallet account is selected.",
12,Click Next and Connect with the hardware wallet account.,,,"The MetaMask popup is closed. You are connected to the test dapp.",
13,"Click Sign in the ""Personal Sign"" section",,,"The info modal instructions for signing with hardware wallet is displayed. The signature message is in Plain Text.",
14,"Click Sign in the displayed modal. Then the Accept the Signature in the hardware wallet device.",,,The signature hash is displayed on the test dapp.,
15,Verify signed hash.,,,The signed address is correctly verified.,The address shown in the test dapp is the same as the hardware wallet account.

0 comments on commit 9dfde3b

Please sign in to comment.