Skip to content

Comments

test: Multiclient MMC E2E tests#26203

Open
jiexi wants to merge 17 commits intomainfrom
jl/add-mmc-multi-client-tests
Open

test: Multiclient MMC E2E tests#26203
jiexi wants to merge 17 commits intomainfrom
jl/add-mmc-multi-client-tests

Conversation

@jiexi
Copy link
Contributor

@jiexi jiexi commented Feb 18, 2026

Description

Adds Multiclient MMC E2E tests using the browser playground

Changelog

CHANGELOG entry: null

Related issues

See: MetaMask/connect-monorepo#157
See: MetaMask/connect-monorepo#174

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Screen.Recording.2026-02-19.at.3.12.23.PM.mov

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.

Note

Medium Risk
Mostly test and test-harness changes, but it introduces a local file: dependency and modifies shared Appwright page objects, which could affect CI determinism and other E2E tests.

Overview
Adds a new connection-multiclient.spec.js Appwright performance test that exercises multiple simultaneous clients/scopes against the Browser Playground (connect, sign on EVM/Wagmi, sign on Solana, disconnect/reconnect each scope, and a concurrent-connection interruption scenario).

Updates the Browser Playground page object to support the new test flows: adds Wagmi disconnect selectors/actions, adds Solana selectors/actions/assertions, makes scope-card lookup case-insensitive, and adds assertScopeCardNotVisible. Connection tests for legacy EVM, multichain, and Wagmi are marked test.skip, and the EVM flow switches from relaunching Chrome to switchToMobileBrowser and adds app-cycling steps to ensure accounts are created; the connection modal network selection now scrolls into view before tapping.

Dev tooling is adjusted to use a local @metamask/browser-playground dependency (file:) with corresponding yarn.lock updates, and a new SolanaSignModal screen object is introduced for confirming Solana signatures.

Written by Cursor Bugbot for commit 662cc5a. This will update automatically on new commits. Configure here.

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

@jiexi jiexi changed the title jl/add mmc multi client tests WIP: Multiclient MMC E2E tests Feb 18, 2026
@jiexi jiexi added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Feb 18, 2026
"@metamask/auto-changelog": "^5.3.0",
"@metamask/browser-passworder": "^5.0.0",
"@metamask/browser-playground": "0.2.0",
"@metamask/browser-playground": "file:../connect-monorepo/playground/browser-playground",
Copy link

Choose a reason for hiding this comment

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

Local file path dependency for browser-playground package

High Severity

The @metamask/browser-playground dependency was changed from the npm version "0.2.0" to a local file reference "file:../connect-monorepo/playground/browser-playground", pointing to a directory outside the repository. This will cause yarn install to fail for any developer or CI environment that doesn't have this exact local monorepo checkout at the specified relative path.

Additional Locations (1)

Fix in Cursor Fix in Web

Triggered by project rule: BUGBOT Rules

Copy link
Contributor Author

Choose a reason for hiding this comment

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

requires a browser playground release

@github-actions github-actions bot added size-L and removed size-M labels Feb 19, 2026
@jiexi jiexi changed the title WIP: Multiclient MMC E2E tests test: Multiclient MMC E2E tests Feb 19, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

if (AppwrightSelectors.isAndroid(this._device)) {
return AppwrightSelectors.getElementByXpath(this._device, '//android.widget.TextView[@text="Confirm"]');
}
}
Copy link

Choose a reason for hiding this comment

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

SolanaSignModal missing iOS support causes crash

Medium Severity

The confirmButton getter only handles Android devices and returns undefined on iOS, causing tapConfirmButton to call AppwrightGestures.tap(undefined) which will crash. The appwright config defines iOS test configurations (mm-connect-ios-browserstack and mm-connect-ios-local) that match these tests, making this a real execution path that will fail.

Fix in Cursor Fix in Web

@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR contains changes exclusively to test infrastructure for separate test frameworks (WDIO and performance tests), with no changes to the main application code:

  1. package.json/yarn.lock: Changed @metamask/browser-playground from npm to a local file path - this is a dev dependency used only for testing, not affecting the production app.

  2. tests/performance/mm-connect/: Performance test changes including:

    • Skipping 3 existing tests (connection-evm, connection-multichain, connection-wagmi)
    • Adding a new multiclient connection test
    • These are Appwright-based performance tests, not Detox E2E tests
  3. wdio/screen-objects/: WebDriverIO screen object additions for Solana testing:

    • New SolanaSignModal.js
    • Extended BrowserPlaygroundDapp.js with Solana selectors/actions
    • Minor fix to DappConnectionModal.js (scrollIntoView)
    • These are WDIO test utilities, not Detox

Per the guidance: "Changes to wdio/ or tests/performance directories (separate test frameworks) do not require Detox tags - select none unless app code is also changed."

No Detox E2E tests are needed since no application code is modified.

Performance Test Selection:
While this PR modifies performance test files in tests/performance/mm-connect/, the changes are: (1) skipping existing tests with test.skip, (2) adding a new test file, and (3) reducing timeouts. These are test infrastructure changes that don't require running performance tests to validate - they are changes TO the performance tests themselves, not changes that could impact app performance. The new multiclient test and modified screen objects are test code additions. Running performance tests would not validate these changes since the modified tests are skipped and the new test is a new addition. No app code that could affect performance is changed.

View GitHub Actions results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant