-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Explanation Test scenarios for eth sign, personal sign, sign typed data, sign in with ethereum, encrypt & decrypt message, and connecting and disconnecting from dapp Closes #18941 Closes #18940 Closes #18929 <!-- Thanks for the pull request. Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? Are there any issues, Slack conversations, Zendesk issues, user stories, etc. reviewers should consult to understand this pull request better? For instance: * Fixes #12345 * See: #67890 --> ## Screenshots/Screencaps <!-- If you're making a change to the UI, make sure to capture a screenshot or a short video showing off your work! --> ### Before <!-- How did the UI you changed look before your changes? Drag your file(s) below this line: --> ### After <!-- How does it look now? Drag your file(s) below this line: --> ## Manual Testing Steps <!-- How should reviewers and QA manually test your changes? For instance: - Go to this screen - Do this - Then do this --> ## Pre-merge author checklist - [x] I've clearly explained: - [x] What problem this PR is solving - [x] How this problem was solved - [x] How reviewers can test my changes - [x] Sufficient automated test coverage has been added ## Pre-merge reviewer checklist - [ ] Manual testing (e.g. pull and build branch, run in browser, test code being changed) - [ ] PR is linked to the appropriate GitHub issue - [ ] **IF** this PR fixes a bug in the release milestone, add this PR to the release milestone If further QA is required (e.g. new feature, complex testing steps, large refactor), add the `Extension QA Board` label. In this case, a QA Engineer approval will be be required. --------- Co-authored-by: Marina Boboc <120041701+benjisclowder@users.noreply.github.com> Co-authored-by: Chloe Gao <chloe.gao@consensys.net> Co-authored-by: chloeYue <105063779+chloeYue@users.noreply.github.com>
- Loading branch information
1 parent
3801fda
commit 4a08daf
Showing
6 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Steps,Test Steps,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. | ||
The selected network is Ethereum Mainnet.", | ||
3,Switch networks to a test network.,e.g. Sepolia.,"The Sepolia balance is shown on the overview. | ||
The wallet address is shown on the overview. | ||
The selected network is Sepolia.", | ||
4,"Open the accounts options menu, select settings. In advanced tab, enable the eth_sign request.",,The eth_sign toggle is ON., | ||
5,Open the test dapp in another tab.,https://metamask.github.io/test-dapp/,, | ||
6,Proceed to Connect with MetaMask.,,, | ||
7,Connect with the current account.,,, | ||
8,"Sign ""Eth Sign"" messages",,The message is in hexadecimal format., | ||
9,Verify signed hash.,,The signed address is verified., |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Steps,Test Steps,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. | ||
The selected network is Ethereum Mainnet.", | ||
3,Switch networks to a test network.,e.g. Sepolia.,"The Sepolia balance is shown on the overview. | ||
The wallet address is shown on the overview. | ||
The selected network is Sepolia.", | ||
4,Open the test dapp in another tab.,https://metamask.github.io/test-dapp/,, | ||
5,Proceed to Connect with MetaMask.,,, | ||
6,Connect with the current account.,,, | ||
7,"Sign ""Personal Sign"" message",,The message is in plain text format., | ||
8,Verify signed hash.,,The signed address is verified., |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Steps,Test Steps,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. | ||
The selected network is Ethereum Mainnet.", | ||
3,Switch networks to a test network.,e.g. Sepolia.,"The Sepolia balance is shown on the overview. | ||
The wallet address is shown on the overview. | ||
The selected network is Sepolia.", | ||
4,Open the test dapp in another tab.,https://metamask.github.io/test-dapp/,, | ||
5,Proceed to Connect with MetaMask.,,, | ||
6,Connect with the current account.,,, | ||
7,"Sign ""Sign In With Ethereum"" message",,The message is in JSON formatting,Verify that alternative parameters of Sign In with Ethereum messages are shown and formatted correctly. | ||
8,Verify signed hash.,,The signed address is verified., |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Steps,Test Steps,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. | ||
The selected network is Ethereum Mainnet.", | ||
3,Switch networks to a test network.,e.g. Sepolia.,"The Sepolia balance is shown on the overview. | ||
The wallet address is shown on the overview. | ||
The selected network is Sepolia.", | ||
4,Open the test dapp in another tab.,https://metamask.github.io/test-dapp/,, | ||
5,Proceed to Connect with MetaMask.,,, | ||
6,Connect with the current account.,,, | ||
7,"Sign ""Sign Typed Data"" transaction",,The message is in JSON formatting,"Verify that v1, v3, v4 of Sign Typed Data messages are shown and formatted correctly." | ||
8,Verify signed hash.,,The signed address is verified., |
16 changes: 16 additions & 0 deletions
16
test/scenarios/12. encrypt and decrypt/encrypt and decrypt.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Steps,Test Steps,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. | ||
The selected network is Ethereum Mainnet.", | ||
3,Switch networks to a test network.,e.g. Sepolia.,"The Sepolia balance is shown on the overview. | ||
The wallet address is shown on the overview. | ||
The selected network is Sepolia.", | ||
4,Open the test dapp in another tab.,https://metamask.github.io/test-dapp/,, | ||
5,Proceed to Connect with MetaMask.,,, | ||
6,Connect with the current account.,,, | ||
7,"On testdapp, click ""Get encryption key"".",,Request encryption public key notification screen is shown., | ||
8,Proceed to confirm get encryption key in notification window.,,The encryption key is displayed on testdapp page., | ||
9,"On testdapp, in encrypt/decrypt section, enter a message in input field and click ""Encrypt"".",e.g. Hello,The encrypted message is displayed in ciphertext format.,Make a copy of the encrypted message. | ||
10,"On testdapp, paste the copied message in previous step in the input field, then click ""Decrypt"". ",,Decrypt request notification screen is shown., | ||
11,Proceed to confirm decrypt message in notification.,e.g. Hello,"The decrypted message is displayed, and the value is the same as the previously entered one.", |
12 changes: 12 additions & 0 deletions
12
test/scenarios/17. permissions/connecting and disconnecting from a dapp.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Steps,Test Steps,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. | ||
The selected network is Ethereum Mainnet.", | ||
4,Open the test dapp in another tab.,https://metamask.github.io/test-dapp/,, | ||
5,Proceed to Connect with MetaMask.,,, | ||
6,Connect with the current account.,,, | ||
7,Open the connection menu,,"The current dapp is shown. | ||
The current list of connected accounts are shown.","Connection icon is in the app header, next to the account options icon." | ||
8,Disconnect current account from dapp via account options.,,"The previously connected address is removed from the list. | ||
The dapp's eth_accounts permission losses that address.", |