Skip to content

Provides device emulation via --deviceName flag using playwright#132

Draft
MildMax wants to merge 13 commits intomainfrom
mildmax/mobile-emulation-ts
Draft

Provides device emulation via --deviceName flag using playwright#132
MildMax wants to merge 13 commits intomainfrom
mildmax/mobile-emulation-ts

Conversation

@MildMax
Copy link

@MildMax MildMax commented Feb 17, 2026

  • Provides new flag --device to allow device emulation
  • Users are allowed to provide custom viewports that override device defaults via --width and --height CLI args
  • Updates playwright to 1.58.2 as part of bug fix for isMobile spawning multiple ffmpeg processes on chromium browsers in 1.57.0
  • Omits chrome-canary and chrome-beta from device emulation unit tests, adds note to README indicating telescope does not support device emulation for the chrome beta and chrome canary browsers
  • Sets node version 24 to help with mobile emulation in chrome browsers

Closes #4

@MildMax MildMax force-pushed the mildmax/mobile-emulation-ts branch 3 times, most recently from f35be5a to 9fd0cd9 Compare February 18, 2026 20:54
@sergeychernyshev
Copy link
Member

Hey @MildMax, can you update the PR description with what else you did in this PR (I see that you upgraded playwright - was it needed for something specific?).

Also, can you link the issue in this PR as well?

@sergeychernyshev
Copy link
Member

I also see extra space, please run the npm run format on it.

Copy link
Member

@sergeychernyshev sergeychernyshev left a comment

Choose a reason for hiding this comment

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

All looks great and straightforward with just a couple comments.

Still getting

Jest did not exit one second after the test run has completed.

'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.

@@ -0,0 +1,135 @@
import fs from 'fs';
import { launchTest, SuccessfulTestResult } from '../src/index.js';
Copy link
Member

Choose a reason for hiding this comment

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

My TypeScript complains that SuccessfulTestResult is only used for types and should be imported separately as such.

@Judyzc
Copy link
Contributor

Judyzc commented Feb 19, 2026

All looks great and straightforward with just a couple comments.

Still getting

Jest did not exit one second after the test run has completed.

'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.

I got the same thing with jest and that's about it

@Judyzc
Copy link
Contributor

Judyzc commented Feb 20, 2026

All looks great and straightforward with just a couple comments.
Still getting

Jest did not exit one second after the test run has completed.

'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.

I got the same thing with jest and that's about it

I'm no longer getting this timeout warning

@MildMax MildMax force-pushed the mildmax/mobile-emulation-ts branch from 88e7cd9 to 0e4aa7a Compare February 24, 2026 19:46
@MildMax MildMax changed the title Provides device emulation via --deviceName flag using playwright#80 Provides device emulation via --deviceName flag using playwright Feb 24, 2026
@MildMax MildMax force-pushed the mildmax/mobile-emulation-ts branch from ca88ad8 to 431f1c8 Compare February 24, 2026 20:14
@MildMax MildMax marked this pull request as draft February 25, 2026 16:12
@MildMax
Copy link
Author

MildMax commented Feb 25, 2026

moved to draft and paused due to issues with hanging processes when emulating devices on chromium based browsers

@sergeychernyshev sergeychernyshev added the ticket This label indicates that internal ticket was created to track it. label Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ticket This label indicates that internal ticket was created to track it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: 📱Mobile Emulation

3 participants