Skip to content

Conversation

@seaona
Copy link
Member

@seaona seaona commented Jan 29, 2024

Description

This PR adds an e2e spec for testing Blockaid support to multiple networks. This verifies that:

  • We initially display the malicious warning for Mainnet
  • We switch to another supported network and we continue to display the malicious warning (in this case Arbitrum)

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/993

Manual testing steps

  1. Check circle ci job
  2. Alternatively, run the test locally yarn test:e2e:single test/e2e/tests/ppom-blockaid-alert-networks-support.spec.js --browser=chrome

Screenshots/Recordings

Screenshot from 2024-01-29 11-43-34

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • 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.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

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

@seaona seaona added the team-confirmations-secure-ux-PR PRs from the confirmations team label Jan 29, 2024
@seaona seaona self-assigned this Jan 29, 2024
)
.withJsonBodyIncluding({
method: 'eth_chainId',
})
Copy link
Member Author

Choose a reason for hiding this comment

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

there was a default mock for Arbitrum that another test is using, that returns the chain id to any request made to Arbitrum RPC. We don't want this mock to be applied to all requests, since now we need to mock different requests, so this mock is now only applied when the chainId method is called - preserving the other test functionality, as well as making it work with new Arbitrum mocks added in this PR

@metamaskbot
Copy link
Collaborator

Builds ready [b180b6a]
Page Load Metrics (833 ± 16 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint104164125178
domContentLoaded105724136
load7709038333416
domInteractive105724136
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [04c3ed7]
Page Load Metrics (863 ± 42 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint100147119147
domContentLoaded10471794
load75411648638842
domInteractive10471794
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@seaona seaona marked this pull request as ready for review January 29, 2024 12:03
@seaona seaona requested a review from a team as a code owner January 29, 2024 12:03
@seaona seaona merged commit 4632dcd into develop Jan 29, 2024
@seaona seaona deleted the test-ppom-multinetwork branch January 29, 2024 14:31
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2024
@metamaskbot metamaskbot added the release-11.11.0 Issue or pull request that will be included in release 11.11.0 label Jan 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.11.0 Issue or pull request that will be included in release 11.11.0 team-confirmations-secure-ux-PR PRs from the confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants