-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
test: part 1 of adding the appium-playwright framework #23671
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
base: main
Are you sure you want to change the base?
test: part 1 of adding the appium-playwright framework #23671
Conversation
|
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. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning MetaMask internal reviewing guidelines:
Ignoring alerts on:
|
|
@SocketSecurity ignore npm/[email protected] - expected and verified |
|
@SocketSecurity ignore npm/[email protected] - expected for dom parsing |
|
@SocketSecurity ignore npm/[email protected] - also expected, driver is downloaded automatically |
e2e/framework/services/providers/browserstack/BrowserStackAPI.ts
Outdated
Show resolved
Hide resolved
e2e/framework/services/providers/emulator/EmulatorConfigBuilder.ts
Outdated
Show resolved
Hide resolved
cortisiko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small feedback. Otherwise looks good
e2e/framework/services/providers/browserstack/BrowserStackConfigBuilder.ts
Show resolved
Hide resolved
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
Adds unified approach for element location in page objects through:
- Generic approach for defining locators
- Adds a Platform and Framework detector to avoid relying on framework
specific ways
- Turns framework files stack agnostic
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry:
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
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**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds a unified Detox/Appium element encapsulation layer with
framework/platform detectors, updates fixtures to use it, and wires
E2E_FRAMEWORK through CI and env configs.
>
> - **E2E framework**:
> - Add `e2e/framework/EncapsulatedElement.ts` with
`EncapsulatedElement`, `encapsulated`, `asPlaywrightElement`,
`asDetoxElement`, and `LocatorStrategy` for unified Detox/Appium
locators.
> - Add `e2e/framework/FrameworkDetector.ts` and
`e2e/framework/PlatformLocator.ts` for framework/platform detection.
> - Export new APIs via `e2e/framework/index.ts`.
> - Add comprehensive tests in
`e2e/framework/EncapsulatedElement.test.ts` and architecture doc
`e2e/framework/UNIFIED_E2E_ARCHIITECTURE.md`.
> - **Fixtures**:
> - Update `e2e/framework/fixtures/FixtureHelper.ts` and
`e2e/framework/fixtures/FixtureUtils.ts` to use
`PlatformDetector`/`FrameworkDetector`, refine Android `adb reverse`
setup/cleanup, and adjust dapp/Anvil port helpers.
> - **CI/Config**:
> - Add `E2E_FRAMEWORK` env var to `.e2e.env.example`.
> - Set `E2E_FRAMEWORK: 'detox'` in workflows:
`.github/workflows/build-android-e2e.yml`,
`.github/workflows/build-ios-e2e.yml`,
`.github/workflows/run-e2e-workflow.yml`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2243d40. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
21c1632
|
@SocketSecurity ignore npm/[email protected] verified |
|
@SocketSecurity ignore npm/[email protected] this is expected |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThis PR introduces a unified E2E testing framework supporting both Detox and WebDriverIO/Playwright. The changes are primarily additive, introducing new files for the Appium/WebDriverIO path while preserving the existing Detox infrastructure. Key observations:
Risk is medium because:
Selected tags rationale:
These two smoke tests provide good coverage of the fundamental test paths that would be affected if the framework detection or fixture loading had issues. If these pass, it indicates the infrastructure changes haven't broken the existing test foundation. |
|



Description
WebdriverIO/Playwright POC
Adds an appium framework that leverages
@playwright/testas a test runner.Key Features
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds a new Appium/WebdriverIO E2E stack powered by Playwright, including a unified element API, providers (emulator/BrowserStack), config/fixtures, and CI/env wiring.
EncapsulatedElement,FrameworkDetector,PlatformDetector, helpers (asPlaywrightElement,asDetoxElement).PlaywrightAdapter,PlaywrightMatchers,PlaywrightGestures,Utilities.boxedStep.e2e/playwright.config.ts,framework/config/*,framework/fixture/index.ts, enhanced fixture helpers/utils to handle ports/platform detection.EncapsulatedElement.E2E_FRAMEWORKenv var (default via examples); setE2E_FRAMEWORK='detox'in build/run workflows to preserve current flows.@playwright/testandwebdriverioand update lockfile.Written by Cursor Bugbot for commit a2ed7c9. This will update automatically on new commits. Configure here.