Skip to content

fix: Swap-Send flaky test fix#25041

Merged
vthomas13 merged 5 commits intodevelopfrom
swap-send-erc20-flaky-fix
Jun 11, 2024
Merged

fix: Swap-Send flaky test fix#25041
vthomas13 merged 5 commits intodevelopfrom
swap-send-erc20-flaky-fix

Conversation

@vthomas13
Copy link
Copy Markdown
Contributor

@vthomas13 vthomas13 commented Jun 4, 2024

Description

This PR is a fix for the flakiness in the e2e test case: "Swap-Send ERC20 to non-contract address with data that matches swap data signature submits a transaction successfully"
image
Additionally there are some minor readability improvements.

Open in GitHub Codespaces

Related issues

Fixes: #25026

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

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.

@vthomas13 vthomas13 requested a review from a team as a code owner June 4, 2024 20:13
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 4, 2024

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.

@vthomas13 vthomas13 added the team-extension-platform Extension Platform team label Jun 4, 2024
@vthomas13 vthomas13 force-pushed the swap-send-erc20-flaky-fix branch 4 times, most recently from e077f36 to 11bc0cf Compare June 10, 2024 18:31
}
};

element.nestedFindElement = async (rawLocator) => {
Copy link
Copy Markdown
Contributor Author

@vthomas13 vthomas13 Jun 10, 2024

Choose a reason for hiding this comment

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

I think this is somewhat inconsistent with the other webdriver methods for finding elements:
[findElement(s), findClickableElement(s), findVisibleElement, etc.]

* @param {string | object} nestedLocator - Nested element locator
* @returns {Promise<WebElement>} A promise that resolves to the found nested element.
*/
async findNestedElement(element, nestedLocator) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same file, slightly different name, added docs

@DDDDDanica
Copy link
Copy Markdown
Contributor

LGTM !

Copy link
Copy Markdown
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! Thanks!

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.59%. Comparing base (832ae1c) to head (46faec1).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25041   +/-   ##
========================================
  Coverage    65.59%   65.59%           
========================================
  Files         1363     1363           
  Lines        54172    54172           
  Branches     14167    14167           
========================================
  Hits         35531    35531           
  Misses       18641    18641           

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

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [11bc0cf]
Page Load Metrics (119 ± 138 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6812087126
domContentLoaded9221131
load401367119286138
domInteractive9221131
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 11 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@vthomas13 vthomas13 force-pushed the swap-send-erc20-flaky-fix branch from 11bc0cf to 46faec1 Compare June 11, 2024 13:48
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [46faec1]
Page Load Metrics (47 ± 2 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint64927984
domContentLoaded8151011
load39564752
domInteractive8151011
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 11 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@vthomas13 vthomas13 merged commit 2b2ee43 into develop Jun 11, 2024
@vthomas13 vthomas13 deleted the swap-send-erc20-flaky-fix branch June 11, 2024 14:54
@github-actions github-actions bot locked and limited conversation to collaborators Jun 11, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 11, 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 Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flaky test: "Swap-Send ERC20 to non-contract address with data that matches swap data signature submits a transaction successfully"

4 participants