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

test: Add manual scenario for network polling scenario #26195

Merged
merged 5 commits into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions test/manual-scenarios/security/stop-network-polling-scenario.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Stop Network Polling When MetaMask UI Is Closed

## Feature Description

This test scenario ensures that after closing the MetaMask UI, the extension stops sending network requests, including `etherscan`, `eth_call`, `eth_getBalance`, `eth_blockNumber`, and `eth_getBlockByNumber`, to Infura or any other RPC provider. This behavior is crucial for preventing unnecessary network traffic and ensuring privacy and efficiency.

## Test Scenario

### Background

- **Given** the user has installed the MetaMask extension
- **And** the user has onboarded successfully

### Scenario: Verify no network requests are made after MetaMask UI is closed

1. **Given** the user opens the MetaMask extension
2. **And** the user navigates to the service worker dev console's network tab
3. **When** the user observes "etherscan", "eth_call", "eth_getBalance", "eth_blockNumber" and "eth_getBlockByNumber" network requests
4. **And** then closes the MetaMask UI while leaves the dev console open
5. **Then** no new network requests should occur after the UI is closed

## Expected Outcome

After the MetaMask UI is closed, the extension should cease all network polling activities, including but not limited to `etherscan`, `eth_call`, `eth_getBalance`, `eth_blockNumber`, and `eth_getBlockByNumber` requests. This ensures that the extension does not perform any unnecessary network requests when it is not in use by the user.