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

refactor: move ganache from hooks to fixtures #7117

Merged
merged 10 commits into from
Sep 6, 2023
Merged

Conversation

seaona
Copy link
Contributor

@seaona seaona commented Sep 4, 2023

Description

  • This PR moves the ganache server and contract seeder inside fixtures, instead of previously having it in beforeAll hooks. This cleans up the tests, as well as help us reach code parity with Extension repo
  • This PR adds the login fixture and withGanache fixture in all Confirmations test, except the signatures one (since it would need a big refactor of all tests, so it will be done in a sub-sequent PR)

Result

  • All confirmations tests continue to pass
  • All confirmations tests start with the wallet setup, skipping the onboarding
  • All confirmations tests start with ganache running and selected network, as well as the account seeded with ETH and using the london hardfork (EIP1559 gas)

Screenshots/Recordings

Screenshot from 2023-09-04 14-33-36

Screenshot from 2023-09-04 14-38-20

Screenshot from 2023-09-04 14-41-27

Screenshot from 2023-09-04 15-21-44

Issue

fixes https://github.com/MetaMask/MetaMask-planning/issues/1206

This also closes:

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

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.

@seaona seaona self-assigned this Sep 4, 2023
@seaona seaona added team-confirmations-secure-ux-PR PR from the confirmations team needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Sep 4, 2023
@seaona seaona marked this pull request as ready for review September 4, 2023 13:49
@seaona seaona requested a review from a team as a code owner September 4, 2023 13:49
@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (0c81a66) 32.84% compared to head (4658b48) 32.84%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7117   +/-   ##
=======================================
  Coverage   32.84%   32.84%           
=======================================
  Files        1001     1001           
  Lines       26780    26780           
  Branches     2118     2118           
=======================================
  Hits         8797     8797           
  Misses      17559    17559           
  Partials      424      424           

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

jpuri
jpuri previously approved these changes Sep 5, 2023
Copy link
Contributor

@jpuri jpuri left a comment

Choose a reason for hiding this comment

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

👍

blackdevelopa
blackdevelopa previously approved these changes Sep 5, 2023
Copy link
Contributor

@blackdevelopa blackdevelopa left a comment

Choose a reason for hiding this comment

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

Looks good. Left a small comment.

@seaona seaona dismissed stale reviews from blackdevelopa and jpuri via 4658b48 September 5, 2023 13:11
@sonarcloud
Copy link

sonarcloud bot commented Sep 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@seaona
Copy link
Contributor Author

seaona commented Sep 5, 2023

Copy link
Contributor

@blackdevelopa blackdevelopa left a comment

Choose a reason for hiding this comment

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

Looks good 🎉

@seaona seaona removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Sep 6, 2023
@seaona seaona merged commit 76f3333 into main Sep 6, 2023
13 checks passed
@seaona seaona deleted the refactor-ganache-fixtures branch September 6, 2023 14:09
@github-actions github-actions bot locked and limited conversation to collaborators Sep 6, 2023
@metamaskbot metamaskbot added the release-7.8.0 Issue or pull request that will be included in release 7.8.0 label Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.8.0 Issue or pull request that will be included in release 7.8.0 team-confirmations-secure-ux-PR PR from the confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants