Skip to content

chore: use Firefox ServiceBuilder and add geckodriver path for e2e in Linux + Firefox snap#24703

Merged
seaona merged 3 commits intodevelopfrom
chore-firefox-snap-path
May 22, 2024
Merged

chore: use Firefox ServiceBuilder and add geckodriver path for e2e in Linux + Firefox snap#24703
seaona merged 3 commits intodevelopfrom
chore-firefox-snap-path

Conversation

@seaona
Copy link
Copy Markdown
Member

@seaona seaona commented May 22, 2024

Description

In this PR we enable an envar which fixes the e2e for running against Firefox, when the browser is installed as a snap (Linux).
For doing so, we need to leverage the Firefox ServiceBuilder class.
Using the service class by default is something that we already do in Chrome.
For Firefox, we only did this in the case a custom port was passed. Now it's done always, and in the case we pass a port, we configure it as we did.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Check ci FF tests continue to work normally
  2. If you are on Linux, install FF as snap and run a test with the flag FIREFOX_SNAP=true yarn test:e2e:single test/e2e/tests/tokens/nft/import-erc1155.spec.js --browser=firefox

Screenshots/Recordings

Before

Screenshot from 2024-05-22 09-13-26

After

ff-snap-path-child.mp4

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • 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.

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

@seaona seaona changed the title chore: adds geckodriver path for e2e in Linux + Firefox snap chore: use Firefox ServiceBuilder and adds geckodriver path for e2e in Linux + Firefox snap May 22, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.40%. Comparing base (4a5cd3d) to head (7e02c0c).
Report is 10 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #24703   +/-   ##
========================================
  Coverage    67.40%   67.40%           
========================================
  Files         1289     1289           
  Lines        50248    50248           
  Branches     13011    13011           
========================================
  Hits         33865    33865           
  Misses       16383    16383           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seaona seaona self-assigned this May 22, 2024
@seaona seaona added the team-extension-platform Extension Platform team label May 22, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [7e02c0c]
Page Load Metrics (1226 ± 564 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint601861013316
domContentLoaded96921168
load48304212261175564
domInteractive96921168
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@seaona seaona changed the title chore: use Firefox ServiceBuilder and adds geckodriver path for e2e in Linux + Firefox snap chore: use Firefox ServiceBuilder and add geckodriver path for e2e in Linux + Firefox snap May 22, 2024
@seaona seaona marked this pull request as ready for review May 22, 2024 10:25
@seaona seaona requested a review from a team as a code owner May 22, 2024 10:25
@seaona seaona added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label May 22, 2024
Copy link
Copy Markdown
Contributor

@danjm danjm left a comment

Choose a reason for hiding this comment

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

👏

@seaona seaona merged commit 0929bed into develop May 22, 2024
@seaona seaona deleted the chore-firefox-snap-path branch May 22, 2024 15:22
@github-actions github-actions bot locked and limited conversation to collaborators May 22, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label May 22, 2024
@metamaskbot metamaskbot added release-11.16.6 Issue or pull request that will be included in release 11.16.6 and removed release-11.18.0 labels Jun 4, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Missing release label release-11.16.6 on PR. Adding release label release-11.16.6 on PR and removing other release labels(release-11.18.0), as PR was cherry-picked in branch 11.16.6.

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

Labels

release-11.16.6 Issue or pull request that will be included in release 11.16.6 team-extension-platform Extension Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants