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 contract interaction test #26420

Merged
merged 2 commits into from
Aug 14, 2024
Merged

fix: Flaky contract interaction test #26420

merged 2 commits into from
Aug 14, 2024

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Aug 14, 2024

Description

On #26234, scrollAndConfirmAndAssertConfirm was modified to use clickElementSafe instead of clickElement.

Even though this was probably useful for the test in snap-account-contract-interaction.spec.ts that the PR introduced, it broke Sends a contract interaction type 2 transaction with custom nonce editing (EIP1559) inside contract-interaction-redesign.spec.ts. This is because clickElementSafe doesn't attempt to find a clickable element multiple times like clickElement. Without that retry, the scroll button was not pressed. Without that, the confirm button in the footer was not enabled and the test fails.

Adding a delay before the particular usage of scrollAndConfirmAndAssertConfirm that was failing fixes the test execution.

Open in GitHub Codespaces

Related issues

Fixes: #26417

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.

@pedronfigueiredo pedronfigueiredo added the team-confirmations Push issues to confirmations team label Aug 14, 2024
@pedronfigueiredo pedronfigueiredo self-assigned this Aug 14, 2024
@pedronfigueiredo pedronfigueiredo requested a review from a team as a code owner August 14, 2024 13:51
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.

@hjetpoluru hjetpoluru self-requested a review August 14, 2024 14:25
Copy link
Contributor

@hjetpoluru hjetpoluru 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

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.97%. Comparing base (e644e1d) to head (d173af1).

Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #26420       +/-   ##
============================================
+ Coverage         0   69.97%   +69.97%     
============================================
  Files            0     1422     +1422     
  Lines            0    49938    +49938     
  Branches         0    13861    +13861     
============================================
+ Hits             0    34943    +34943     
- Misses           0    14995    +14995     

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

@pedronfigueiredo pedronfigueiredo merged commit bef5b8f into develop Aug 14, 2024
77 of 78 checks passed
@pedronfigueiredo pedronfigueiredo deleted the pnf/26417 branch August 14, 2024 14:45
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2024
@metamaskbot metamaskbot added the release-12.4.0 Issue or pull request that will be included in release 12.4.0 label Aug 14, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [d173af1]
Page Load Metrics (692 ± 416 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint673701136129
domContentLoaded108521178
load442301692865416
domInteractive108521178
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@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-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix "Confirmation Redesign Contract Interaction Component..." flaky tests
6 participants