test: adds 2 proof of concepts to fetch logs from test dapps for mm-connect#27124
test: adds 2 proof of concepts to fetch logs from test dapps for mm-connect#27124christopherferreira9 wants to merge 3 commits into
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
No app code is modified. The CommandQueueServer is used by some existing tests (perps, state-export), but the changes are purely additive - new endpoints and methods that don't modify existing behavior. The existing test flows won't be affected. Since these are performance test infrastructure changes with no impact on Detox E2E tests or app functionality, no E2E test tags are needed. Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| throw new Error( | ||
| `getMMConnectDebugLogs timed out after ${timeout}ms — the app did not POST to /mm-connect-debug.json. ` + | ||
| 'Ensure the command queue server is running and the app is polling /mm-connect-debug.json.', | ||
| ); |
There was a problem hiding this comment.
Error message references wrong POST endpoint path
Medium Severity
The timeout error message in getMMConnectDebugLogs tells users the app did not POST to /mm-connect-debug.json, but _isMMConnectDebugLogPost defines the actual POST route as /mm-connect-debug (without .json). Someone debugging a timeout failure would be directed to the wrong endpoint. The existing getExportedState error correctly references /exported-state (the POST path), so this is inconsistent.
Additional Locations (1)
|
|
||
| test.afterAll(async () => { | ||
| // await commandQueueServer.stop(); | ||
| }); |
There was a problem hiding this comment.
Server stop commented out causing resource leak
Low Severity
The commandQueueServer.stop() call is commented out in test.afterAll, so the Koa server started in beforeAll is never shut down. This leaks the server process and port 2446, which can cause port-in-use failures on subsequent test runs or in CI.
| name: process.env.BROWSERSTACK_DEVICE || 'Samsung Galaxy S23 Ultra', // this can changed | ||
| osVersion: process.env.BROWSERSTACK_OS_VERSION || '13.0', // this can changed | ||
| }, | ||
| buildPath: 'bs://a765924da41819f483f9b3143c3560f5e4a53e88', // Path to Browserstack url |
There was a problem hiding this comment.
Hardcoded BrowserStack build hash will become stale
Medium Severity
Both new config entries hardcode buildPath: 'bs://a765924da41819f483f9b3143c3560f5e4a53e88' — a specific BrowserStack build hash. Unlike other configs that use 'PATH-TO-BUILD' as a placeholder, this is a concrete value that will become stale as builds expire. Other entries in this config use environment variables or explicit placeholders for the build path, so this breaks the established pattern.
Additional Locations (1)
|





Description
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Test-only changes, but they modify the shared
CommandQueueServerfixture (new routes/state and CORS preflight handling), which could affect existing E2E runs if assumptions about endpoints or in-memory state change.Overview
Adds two new Appwright projects (
chris-dummyandchris-dummy-server) that run new MM Connect dummy specs on BrowserStack Android using a fixedbs://...build.Extends
CommandQueueServerwith CORSOPTIONShandling plus a simple in-memory MM Connect debug log collector (GET /mm-connect-debug.json,POST /mm-connect-debug) and a polling helpergetMMConnectDebugLogs().Introduces two POC tests: one injects a WebView
consoleinterceptor and prints captured logs, and another startsCommandQueueServerand fetches logs posted by the dapp.Written by Cursor Bugbot for commit fae8de3. This will update automatically on new commits. Configure here.