Skip to content

test(bridge): add gasless swap error banner view test#28010

Merged
davibroc merged 1 commit into
mainfrom
test/swap-cvt
Mar 30, 2026
Merged

test(bridge): add gasless swap error banner view test#28010
davibroc merged 1 commit into
mainfrom
test/swap-cvt

Conversation

@davibroc

@davibroc davibroc commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new component view test for the gasless swap error state in BridgeView
  • Sets up a gasless swap scenario (ETH→USDC on the same chain with gasFeesSponsoredNetwork enabled for 0x1) and a quoteFetchError in BridgeController to trigger the error banner
  • Asserts the error banner appears after the quote fetch failure, then verifies it dismisses correctly when the user presses close (paired positive + negative assertions)

Note

Low Risk
Low risk: adds a UI view test only, exercising an error-state banner and its dismissal without changing production logic.

Overview
Adds a new BridgeView.view test covering the gasless swap error state by simulating a BridgeController.quoteFetchError with sponsored gas enabled and asserting the generic error banner renders.

The test also verifies the banner can be dismissed via the close icon and is removed from the screen afterward.

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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@davibroc davibroc requested a review from a team as a code owner March 27, 2026 03:42
@github-actions

Copy link
Copy Markdown
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.

@metamaskbot metamaskbot added the team-qa QA team label Mar 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The only changed file is app/components/UI/Bridge/Views/BridgeView/BridgeView.view.test.tsx, which is a unit test file. The change adds a single new test case ('shows error banner when gasless swap quote fetch fails and dismisses it on close') inside a new describe('Gasless swap') block. This test validates the BridgeView component's error banner behavior when a gasless swap quote fetch fails.

Key observations:

  1. Test file only - No production code was modified
  2. Unit test, not E2E - This is a Jest/React Testing Library test, not a Detox E2E test
  3. No shared component changes - No changes to navigation, modals, controllers, or any shared infrastructure
  4. No app behavior changes - The test only adds coverage for existing behavior

Since no production code was changed and no E2E test infrastructure was modified, there is no need to run any E2E test tags. The risk is minimal as this is purely additive test coverage.

Performance Test Selection:
Only a unit test file was changed with no production code modifications. There is no performance impact from adding a unit test case.

View GitHub Actions results

@github-actions github-actions Bot added the risk-low Low testing needed · Low bug introduction risk label Mar 27, 2026
@davibroc davibroc added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Mar 27, 2026
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Mar 27, 2026
@sonarqubecloud

Copy link
Copy Markdown

@davibroc davibroc enabled auto-merge March 28, 2026 17:09
@davibroc davibroc added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit 2ac4f44 Mar 30, 2026
91 of 95 checks passed
@davibroc davibroc deleted the test/swap-cvt branch March 30, 2026 17:50
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 30, 2026
@metamaskbot metamaskbot added the release-7.73.0 Issue or pull request that will be included in release 7.73.0 label Mar 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.73.0 Issue or pull request that will be included in release 7.73.0 risk-low Low testing needed · Low bug introduction risk size-S team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants