Skip to content

Conversation

@PeterYinusa
Copy link
Contributor

@PeterYinusa PeterYinusa commented Jul 20, 2022

Explanation

This PR mocks the api calls to 4byte directory. All contract interactions will appear as Deposit in the e2e tests after this change.

Intermittently the 4byte directory returns an error e.g. http 502.

4byte bad gateway

This causes tests fail as the tests expect the transaction to show the method name Deposit/Withdraw, but will show. Contract Interaction when the api is down.

Contract Interaction

Here's an example of the test failure, if you look at the error you can see the test times out while searing for an element that contains the text Deposit.
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/25066/workflows/0d1849c6-62ba-4137-aa41-af14aeb10a1b/jobs/644160

1) Deploy contract and call contract methods
       should display the correct account balance after contract interactions:
     TimeoutError: Waiting for element to be located By(xpath, .//*[contains(concat(' ', normalize-space(./@class), ' '), ' confirm-page-container-summary__action__name ')][(contains(string(.), 'Deposit') or contains(string(.), 'Deposit'))])
Wait timed out after 10036ms
      at /home/circleci/project/node_modules/selenium-webdriver/lib/webdriver.js:906:17
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

More Information

Screenshots/Screencaps

Before

After

Manual Testing Steps

Pre-Merge Checklist

  • PR template is filled out
  • IF this PR fixes a bug, a test that would have caught the bug has been added
  • PR is linked to the appropriate GitHub issue
  • PR has been added to the appropriate release Milestone

+ If there are functional changes:

  • Manual testing complete & passed
  • "Extension QA Board" label has been applied

@github-actions
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.

@PeterYinusa PeterYinusa marked this pull request as ready for review July 20, 2022 16:43
@PeterYinusa PeterYinusa requested a review from a team as a code owner July 20, 2022 16:43
@PeterYinusa PeterYinusa requested a review from jpuri July 20, 2022 16:43
@metamaskbot
Copy link
Collaborator

Builds ready [9b80ed4]
Page Load Metrics (1882 ± 61 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint893591235627
domContentLoaded16662101187311555
load16662187188212761
domInteractive16662101187311555

@PeterYinusa PeterYinusa merged commit 6233ed4 into develop Jul 20, 2022
@PeterYinusa PeterYinusa deleted the mock-signatures branch July 20, 2022 17:39
@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants