Skip to content

test: add file download E2E tests with local HTML fixtures#28634

Merged
chrisleewilcox merged 1 commit into
mainfrom
MMQA-1705-file-download-local-fixtures
Apr 10, 2026
Merged

test: add file download E2E tests with local HTML fixtures#28634
chrisleewilcox merged 1 commit into
mainfrom
MMQA-1705-file-download-local-fixtures

Conversation

@chrisleewilcox
Copy link
Copy Markdown
Contributor

@chrisleewilcox chrisleewilcox commented Apr 10, 2026

Description

Migrates the two file download E2E tests from the quarantined browser-tests.failing.ts into a new browser-download.spec.ts file. Replaces live external URL navigation (tyschenko.github.io) with local HTML fixtures served by DappServer, eliminating external network dependencies and improving test reliability.

Part of the effort to increase API mocking coverage for E2E tests (MMQA-1368).

Changelog

CHANGELOG entry: null

Related issues

Fixes: MMQA-1705

Manual testing steps

Feature: Browser File Download

  Scenario: user downloads a blob file from a local fixture page
    Given the app is launched and user is logged in
    And the browser view is open

    When user navigates to the local blob download fixture page
    And user taps the Download button
    And user confirms the download in the tapjacking dialog
    Then the download success state is displayed

  Scenario: user downloads a base64 file from a local fixture page
    Given the app is launched and user is logged in
    And the browser view is open

    When user navigates to the local base64 download fixture page
    And user taps the Download button
    And user confirms the download in the tapjacking dialog
    Then the download success state is displayed

Screenshots/Recordings

Before

N/A — tests were quarantined in browser-tests.failing.ts due to reliance on external URLs.

After

Both tests passing locally on iOS simulator:

PASS tests/smoke/wallet/browser/browser-download.spec.ts (222.23 s)
  SmokeWalletPlatform: Browser File Download
    ✓ downloads a blob file (121368 ms)
    ✓ downloads a base64 file (92885 ms)

Test Suites: 1 passed, 1 total
Tests:       2 passed, 2 total

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

Low Risk
Low risk because changes are limited to E2E smoke tests and static HTML/text fixtures, with no production code paths affected.

Overview
Adds a new smoke spec browser-download.spec.ts that exercises in-app browser file downloads for both blob and base64 data URL flows.

Replaces reliance on external download pages by introducing local DappServer-served fixtures (tests/fixtures/download/*) that fetch a bundled File.txt and trigger downloads via URL.createObjectURL or FileReader.readAsDataURL.

Reviewed by Cursor Bugbot for commit 9ca245f. Bugbot is set up for automated code reviews on this repo. Configure here.

Migrate blob and base64 file download tests from quarantined
browser-tests.failing.ts. Replace external tyschenko.github.io URLs
with local fixtures served by DappServer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@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 Apr 10, 2026
@chrisleewilcox chrisleewilcox added no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed no changelog required No changelog entry is required for this change and removed size-M labels Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - draft PR

All E2E tests pre-selected.

View GitHub Actions results

@chrisleewilcox chrisleewilcox marked this pull request as ready for review April 10, 2026 03:09
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
16 value mismatches detected (expected — fixture represents an existing user).
View details

@chrisleewilcox chrisleewilcox added this pull request to the merge queue Apr 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 10, 2026
@chrisleewilcox chrisleewilcox added this pull request to the merge queue Apr 10, 2026
Merged via the queue into main with commit c3b271a Apr 10, 2026
155 checks passed
@chrisleewilcox chrisleewilcox deleted the MMQA-1705-file-download-local-fixtures branch April 10, 2026 04:26
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 10, 2026
@metamaskbot metamaskbot added the release-7.74.0 Issue or pull request that will be included in release 7.74.0 label Apr 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no changelog required No changelog entry is required for this change no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.74.0 Issue or pull request that will be included in release 7.74.0 team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants