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

feat: refactor e2e wallet rendered helper function #25352

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

DDDDDanica
Copy link
Contributor

@DDDDDanica DDDDDanica commented Jun 15, 2024

Description

Refactor some e2e tests to use new helper function logInWithBalanceValidation or locateAccountBalanceDOM and remove previous function waitForAccountRendered. The former also two involves balance check from ganache server, we can migrate all to those and remove the DOM only check helper function.

Open in GitHub Codespaces

Related issues

Fixes:

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.

@DDDDDanica DDDDDanica self-assigned this Jun 15, 2024
@DDDDDanica DDDDDanica requested a review from a team as a code owner June 15, 2024 06:03
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.

@DDDDDanica DDDDDanica force-pushed the feature/refactor-wallet-rendered branch 8 times, most recently from 52e004b to cb3e0e7 Compare June 18, 2024 14:38
@DDDDDanica DDDDDanica force-pushed the feature/refactor-wallet-rendered branch 3 times, most recently from e7dd602 to 4fc939b Compare June 19, 2024 13:38
text: `${balance} ETH`,
});
const balanceSelector = '[data-testid="eth-overview__primary-currency"]';
if (ganacheServer) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are situations there the account is not having the balance allocated. eg: we create 2nd account. So to re-use the selector logic, I combined this with waitForAccountRendered downstairs

@DDDDDanica DDDDDanica force-pushed the feature/refactor-wallet-rendered branch 2 times, most recently from d6b6aa5 to 5d22c55 Compare June 19, 2024 15:36
@DDDDDanica DDDDDanica changed the title feature: refactor e2e wallet rendered helper function feat: refactor e2e wallet rendered helper function Jun 19, 2024
@DDDDDanica DDDDDanica force-pushed the feature/refactor-wallet-rendered branch 2 times, most recently from a244190 to 434ac90 Compare June 20, 2024 11:34
@DDDDDanica DDDDDanica force-pushed the feature/refactor-wallet-rendered branch from 434ac90 to 008851b Compare June 20, 2024 13:21
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.38%. Comparing base (da4b61c) to head (008851b).
Report is 18 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25352   +/-   ##
========================================
  Coverage    65.38%   65.38%           
========================================
  Files         1382     1382           
  Lines        54767    54767           
  Branches     14368    14368           
========================================
  Hits         35809    35809           
  Misses       18958    18958           

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

@metamaskbot
Copy link
Collaborator

Builds ready [008851b]
Page Load Metrics (57 ± 17 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint624171077837
domContentLoaded88014157
load39203573517
domInteractive87914157
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@zone-live zone-live left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@chloeYue chloeYue left a comment

Choose a reason for hiding this comment

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

LGTM

@DDDDDanica DDDDDanica merged commit 5c9b126 into develop Jun 21, 2024
74 checks passed
@DDDDDanica DDDDDanica deleted the feature/refactor-wallet-rendered branch June 21, 2024 11:48
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.1.0 Issue or pull request that will be included in release 12.1.0 team-extension-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants