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

fix: flaky BTC e2e tests #26082

Merged
merged 6 commits into from
Jul 26, 2024
Merged

fix: flaky BTC e2e tests #26082

merged 6 commits into from
Jul 26, 2024

Conversation

montelaidev
Copy link
Contributor

@montelaidev montelaidev commented Jul 24, 2024

Description

This PR fixes the flaky tests that happens during the firefox e2e. A btc balance mock was also added to reduce api call usage.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/accounts-planning/issues/531

Manual testing steps

N/a

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.

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.

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.94%. Comparing base (b27dd2b) to head (278dba6).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #26082   +/-   ##
========================================
  Coverage    69.94%   69.94%           
========================================
  Files         1409     1409           
  Lines        49794    49794           
  Branches     13773    13773           
========================================
  Hits         34826    34826           
  Misses       14968    14968           

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

@metamaskbot
Copy link
Collaborator

Builds ready [3aa0dbc]
Page Load Metrics (171 ± 209 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint83125100126
domContentLoaded94822105
load492068171435209
domInteractive94822105
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@montelaidev montelaidev self-assigned this Jul 25, 2024
@montelaidev montelaidev marked this pull request as ready for review July 25, 2024 15:20
@montelaidev montelaidev requested a review from a team as a code owner July 25, 2024 15:20
danroc
danroc previously approved these changes Jul 26, 2024
@danroc danroc changed the title fix: flaky btc e2e tests fix: flaky BTC e2e tests Jul 26, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [60bba26]
Page Load Metrics (67 ± 9 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint73145102199
domContentLoaded106225157
load4112867199
domInteractive106225157
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

test/e2e/accounts/common.ts Show resolved Hide resolved
test/e2e/accounts/common.ts Show resolved Hide resolved
@@ -0,0 +1,59 @@
import { Mockttp } from 'mockttp';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: But we could have just named it common.ts since it's already in test/e2e/flask/btc/ folder!


export async function withBtcAccountSnap(
{
title,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: We could have use the whole test object here instead, so we could have computed the title only once here, rather than having it every calls to withBtcAccountSnap

Co-authored-by: Charly Chevalier <[email protected]>
@metamaskbot
Copy link
Collaborator

Builds ready [278dba6]
Page Load Metrics (145 ± 170 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6013292199
domContentLoaded95925157
load421685145354170
domInteractive95925157
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

@montelaidev montelaidev merged commit 32dc79f into develop Jul 26, 2024
75 checks passed
@montelaidev montelaidev deleted the fix/flaky-btc-e2e-tests branch July 26, 2024 12:23
@github-actions github-actions bot locked and limited conversation to collaborators Jul 26, 2024
@metamaskbot metamaskbot added the release-12.4.0 Issue or pull request that will be included in release 12.4.0 label Jul 26, 2024
@gauthierpetetin gauthierpetetin added release-12.3.0 Issue or pull request that will be included in release 12.3.0 and removed release-12.4.0 Issue or pull request that will be included in release 12.4.0 labels Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.3.0 Issue or pull request that will be included in release 12.3.0 team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants