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 "Signature Approved Event" e2e test #26040

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Jul 23, 2024

Description

Fixes flaky "Signature Approved Event" tests by awaiting a click event

Open in GitHub Codespaces

Related issues

Fixes: #26036

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.

@digiwand digiwand requested a review from a team as a code owner July 23, 2024 09:16
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

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Fixes flaky "Signature Approved Event" e2e tests by ensuring click events are awaited properly.

  • Modified test/e2e/helpers.js to replace direct element clicks with await driver.clickElement.
  • Ensures click actions are completed before proceeding, reducing race conditions.
  • Enhances test stability, particularly for 'Signature Approved Event'.
  • No significant security issues or logical errors introduced.
  • Changes are consistent with existing codebase patterns.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Jul 23, 2024
Copy link
Contributor

@seaona seaona left a comment

Choose a reason for hiding this comment

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

LGTM! great finding 😍

@digiwand
Copy link
Contributor Author

Thanks for the driver.clickElement() > click() suggestion @seaona!

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.67%. Comparing base (9395988) to head (8a8e325).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #26040   +/-   ##
========================================
  Coverage    69.67%   69.67%           
========================================
  Files         1404     1404           
  Lines        49682    49682           
  Branches     13726    13726           
========================================
  Hits         34614    34614           
  Misses       15068    15068           

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

@metamaskbot
Copy link
Collaborator

Builds ready [8a8e325]
Page Load Metrics (74 ± 10 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint72141101199
domContentLoaded106530168
load45121742010
domInteractive106530168
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@digiwand digiwand merged commit 4d9a690 into develop Jul 23, 2024
81 of 82 checks passed
@digiwand digiwand deleted the fix-e2e-flaky-signature-approved-event-await-click branch July 23, 2024 12:56
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2024
@metamaskbot metamaskbot added the release-12.3.0 Issue or pull request that will be included in release 12.3.0 label Jul 23, 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 "Signature Approved Event @no-mmi Successfully tracke..." flaky tests
6 participants