From d0d23f76ed535799c74cd60eab5932744bfd5ed1 Mon Sep 17 00:00:00 2001 From: sleepytanya <104780023+sleepytanya@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:32:07 -0400 Subject: [PATCH] test: add scenario deploy contract, deposit and withdraw (#23536) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** In this PR we add the scenario for the flow 'Deploy contract, deposit and withdraw'. This task belongs to the effort of documenting manual QA flows in this [Epic](https://github.com/MetaMask/metamask-extension/issues/21962). [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/23536?quickstart=1) ## **Related issues** Fixes: [22018](https://github.com/MetaMask/metamask-extension/issues/22018) ## **Manual testing steps** 1. Verify that the test steps align with the sequence in the video. 2. You can find rendered table [here](https://github.com/MetaMask/metamask-extension/blob/03029e205061995b64c42f236da743dd92c9ddf0/test/scenarios/3.%20transactions/deposit%20and%20withdraw.csv). ## **Screenshots/Recordings** https://github.com/MetaMask/metamask-extension/assets/104780023/149dc5fb-e071-46dd-a1f8-c9ebdca9038e ### **Before** N/A ### **After** N/A ## **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". - [ ] In case it's "ready for review", I've changed it from "draft" to "non-draft". ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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. --- .../3. transactions/deposit and withdraw.csv | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/scenarios/3. transactions/deposit and withdraw.csv diff --git a/test/scenarios/3. transactions/deposit and withdraw.csv b/test/scenarios/3. transactions/deposit and withdraw.csv new file mode 100644 index 000000000000..02b0dee8b452 --- /dev/null +++ b/test/scenarios/3. transactions/deposit and withdraw.csv @@ -0,0 +1,22 @@ +Step,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,Deploy Piggy Bank contract.,,"MetaMask popup with estimated gas fees, total fees appears.", +8,Proceed to confirm contract deployment and wait for the transaction to be confirmed.,,"Contract deployment status on MetaMask Activity list displayed as ""Confirmed"". ""Deposit"" and 'Withdraw"" buttons in the Piggy Bank Contract section of the test dapp are active, 'Contract status: deployed"" is visible at the bottom of the section.", +9,Start Deposit transaction.,,"MetaMask popup with estimated gas fees, total fees appears.", +10,Proceed to confirm transaction.,,, +11,Switch back to the wallet.,,,Click on the MetaMask logo or return to the MetaMask tab if the extension is in the expanded view mode. +12,Open the Activity tab.,,"The ""Deposit"" transaction in ""Pending"" status is displayed. The amount is shown in the activity list item.", +13,"Allow some time for the transaction status to update to ""Confirmed"".",,"The ""Deposit"" transaction in ""Confirmed"" status is displayed. The amount is shown in the activity list item.",Waiting times may vary based on network conditions. +14,Proceed to view the transaction on the block explorer.,,Block explorer opens in the new tab., +15,Go back to test dapp,,, +16,"Start ""Withdraw' transaction",,"MetaMask popup with estimated gas fees, total fees appears.", +17,Proceed to confirm the transaction.,,, +18,Switch back to the wallet.,,,Click on the MetaMask logo or return to the MetaMask tab if the extension is in the expanded view mode. +19,Open the Activity tab.,,"The ""Withdraw"" transaction in ""Pending"" status is displayed. The amount is shown in the activity list item.", +20,"Allow some time for the transaction status to update to ""Confirmed"".",,"The ""Withdraw"" transaction in ""Confirmed"" status is displayed. The amount is shown in the activity list item.",Waiting times may vary based on network conditions. +21,Proceed to view the transaction on the block explorer.,,Block explorer opens in the new tab., \ No newline at end of file