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

test: add accounts sync test with balance detection #28715

Merged
merged 13 commits into from
Nov 26, 2024

Conversation

cmd-ob
Copy link
Contributor

@cmd-ob cmd-ob commented Nov 26, 2024

Description

E2E Test for Accounts Syncing when a user has more accounts with balances.

  • Adds new method for changing label from account modal context to be used with other methods
  • Adds new mocks for mocking eth_getBalance in test
  • Updates unlockWallet to be used with custom password

Related issues

Fixes:

Manual testing steps

  1. All E2E tests should pass

Screenshots/Recordings

Screenshot 2024-11-26 at 08 50 30

Pre-merge author checklist

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.

@cmd-ob cmd-ob requested a review from a team as a code owner November 26, 2024 08:53
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

await withFixtures(
{
fixtures: new FixtureBuilder({ onboarding: true })
.withNetworkControllerOnMainnet()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incredible find!

@cmd-ob cmd-ob changed the title add accounts sync test with balance detection e2e: add accounts sync test with balance detection Nov 26, 2024
@cmd-ob cmd-ob changed the title e2e: add accounts sync test with balance detection test: add accounts sync test with balance detection Nov 26, 2024
@cmd-ob cmd-ob added accessibility Issues related to improving the usability of MetaMask by more groups of people. and removed accessibility Issues related to improving the usability of MetaMask by more groups of people. labels Nov 26, 2024
cmd-ob and others added 9 commits November 26, 2024 10:16
## **Description**

PR adds an e2e test to check polling activity

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

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] 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.

## **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.
## **Description**

Change title and description for permit pages.

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3633

## **Manual testing steps**

1. Enable permit signature decoding locally
2. Go to test dapp
3. Check title and description of permit pages

## **Screenshots/Recordings**
<img width="356" alt="Screenshot 2024-11-19 at 3 46 02 PM"
src="https://github.com/user-attachments/assets/41ca3226-4bc5-4022-9e71-8ba2200ae06b">

## **Pre-merge author checklist**

- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [X] I've completed the PR template to the best of my ability
- [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.

## **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.

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
#28720)

## **Description**

fix: transaction flow section layout on re-designed confirmation pages

## **Related issues**

Ref: #28015

## **Manual testing steps**

1. Open test dapp
2. Submit token transfer confirmation
3. Check layout of the page

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**
<img width="253" alt="Screenshot 2024-11-26 at 4 06 28 PM"
src="https://github.com/user-attachments/assets/4680e7d7-2a2b-41cd-8df7-be10fe1442e8">

<!-- [screenshots/recordings] -->

### **After**
<img width="357" alt="Screenshot 2024-11-26 at 4 06 15 PM"
src="https://github.com/user-attachments/assets/66328717-0027-4a43-bc5b-4958d6e8a007">

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [X] I've completed the PR template to the best of my ability
- [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.

## **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.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Bump Snaps packages and handle any required changes.

Summary of Snaps changes:
- Add `snap_getInterfaceContext` JSON-RPC method
- Emit `snapInstalled` and `snapUpdated` events for preinstalled Snaps
- This indirectly makes preinstalled Snaps trigger cronjobs and
lifecycle hooks more reliably.

Closes MetaMask/snaps#2899
Closes MetaMask/snaps#2901

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28678?quickstart=1)
…ask/metamask-extension into e2e/syncing_with_balance_detection
@cmd-ob cmd-ob requested a review from mathieuartu November 26, 2024 13:10
@cmd-ob cmd-ob enabled auto-merge November 26, 2024 13:16
@metamaskbot
Copy link
Collaborator

Builds ready [a7fb6c7]
Page Load Metrics (1719 ± 111 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint35022121635361173
domContentLoaded141621901686235113
load142922131719232111
domInteractive188139199
backgroundConnect978372211
firstReactRender156823126
getState560252010
initialActions01000
loadScripts10271658125219694
setupStore65119189
uiStartup160825641904266128
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@@ -105,3 +106,63 @@ function mockAPICall(server: Mockttp, response: MockResponse) {
json: response.response,
}));
}

type MockInfuraAndAccountSyncOptions = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

Copy link
Contributor

@mathieuartu mathieuartu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOLID!!

@cmd-ob cmd-ob added this pull request to the merge queue Nov 26, 2024
Merged via the queue into develop with commit ad20b71 Nov 26, 2024
75 checks passed
@cmd-ob cmd-ob deleted the e2e/syncing_with_balance_detection branch November 26, 2024 15:01
@github-actions github-actions bot locked and limited conversation to collaborators Nov 26, 2024
@metamaskbot metamaskbot added the release-12.9.0 Issue or pull request that will be included in release 12.9.0 label Nov 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.9.0 Issue or pull request that will be included in release 12.9.0 team-identity
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants