Skip to content

test: Create anvil manager class #15046

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

Merged
merged 22 commits into from
May 9, 2025
Merged

Conversation

cortisiko
Copy link
Member

@cortisiko cortisiko commented May 1, 2025

Description

This is part 2/3 of Anvil Utils. The purpose of this PR is to add an AnvilManager class, which is essentially a wrapper around @viem/anvil that manages an anvil instance that will be used in our tests. It includes:

  • Lifecycle methods (start, quit) for controlling the server
  • A getProvider() method that returns wallet, public, and test clients
  • Utility methods like getAccounts and setAccountBalance

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MMQA-524

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

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.

@cortisiko cortisiko self-assigned this May 1, 2025
@metamaskbot metamaskbot added the team-qa QA team label May 1, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.80%. Comparing base (f518fc9) to head (8c8cf7b).
Report is 49 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15046      +/-   ##
==========================================
- Coverage   67.84%   67.80%   -0.05%     
==========================================
  Files        2343     2353      +10     
  Lines       50476    50746     +270     
  Branches     7452     7494      +42     
==========================================
+ Hits        34246    34408     +162     
- Misses      14062    14149      +87     
- Partials     2168     2189      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cortisiko cortisiko added Run Smoke E2E Requires smoke E2E testing and removed Run Smoke E2E Requires smoke E2E testing labels May 7, 2025
@cortisiko cortisiko added the Run Smoke E2E Requires smoke E2E testing label May 7, 2025
Copy link
Contributor

github-actions bot commented May 7, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 3d75784
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/1ca4ca93-40b3-42ba-a48f-28dff1a17973

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@cortisiko cortisiko added the No QA Needed Apply this label when your PR does not need any QA effort. label May 7, 2025
@cortisiko cortisiko marked this pull request as ready for review May 7, 2025 20:38
Copy link
Contributor

github-actions bot commented May 7, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: c3022c8
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/073cc0de-3174-4aeb-80ba-402acfee0e04

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@tommasini
Copy link
Contributor

It seems that we are missing a dependency accordingly with the CI

@cortisiko cortisiko requested a review from a team as a code owner May 7, 2025 21:27
@cortisiko
Copy link
Member Author

solid catch @tommasini, i was indeed missing a dependency. added it to the package json now 🙏

Copy link

socket-security bot commented May 7, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​acorn-walk@​8.3.410010010082100
Addednpm/​acorn@​8.14.110010010084100

View full report

Copy link

sonarqubecloud bot commented May 7, 2025

@cortisiko cortisiko added Run Smoke E2E Requires smoke E2E testing and removed Run Smoke E2E Requires smoke E2E testing labels May 7, 2025
Copy link
Contributor

github-actions bot commented May 7, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 77e705c
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3ebb8468-65d2-42ac-8859-00737810abd5

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link
Member

@Andepande Andepande left a comment

Choose a reason for hiding this comment

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

Good stuff

@cortisiko cortisiko added this pull request to the merge queue May 9, 2025
Copy link
Contributor

@chrisleewilcox chrisleewilcox left a comment

Choose a reason for hiding this comment

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

Nice work.

Just curious about updating the e2e project docs and how you want to handle that?

@cortisiko
Copy link
Member Author

@chrisleewilcox yeah once we have fully migrated to anvil, i will update the docs! right now this PR is one of many PRs

Merged via the queue into main with commit 90f19f4 May 9, 2025
55 checks passed
@cortisiko cortisiko deleted the MMQA-524-Create-Anvil-Manager-Util branch May 9, 2025 15:26
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2025
@metamaskbot metamaskbot added the release-7.48.0 Issue or pull request that will be included in release 7.48.0 label May 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed Apply this label when your PR does not need any QA effort. release-7.48.0 Issue or pull request that will be included in release 7.48.0 Run Smoke E2E Requires smoke E2E testing team-qa QA team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants