Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: remove invalid device configurations (#16777)

Ross Wollmanaa2391465959
diff --git a/packages/playwright-core/src/server/deviceDescriptorsSource.json b/packages/playwright-core/src/server/deviceDescriptorsSource.json
index 92ce31ff26..fa1ac48cda 100644
--- a/packages/playwright-core/src/server/deviceDescriptorsSource.json
+++ b/packages/playwright-core/src/server/deviceDescriptorsSource.json
@@ -813,28 +813,6 @@
"hasTouch": true,
"defaultBrowserType": "webkit"
},
- "JioPhone 2": {
- "userAgent": "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:103.0) Gecko/48.0 Firefox/103.0 KAIOS/2.5",
- "viewport": {
- "width": 240,
- "height": 320
- },
- "deviceScaleFactor": 1,
- "isMobile": true,
- "hasTouch": true,
- "defaultBrowserType": "firefox"
- },
- "JioPhone 2 landscape": {
- "userAgent": "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:103.0) Gecko/48.0 Firefox/103.0 KAIOS/2.5",
- "viewport": {
- "width": 320,
- "height": 240
- },
- "deviceScaleFactor": 1,
- "isMobile": true,
- "hasTouch": true,
- "defaultBrowserType": "firefox"
- },
"Kindle Fire HDX": {
"userAgent": "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",
"viewport": {
diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts
index 5cb58c64f8..af8e4e3fc0 100644
--- a/packages/playwright-core/types/types.d.ts
+++ b/packages/playwright-core/types/types.d.ts
@@ -16834,8 +16834,6 @@ type Devices = {
"iPhone 13 Pro Max landscape": DeviceDescriptor;
"iPhone 13 Mini": DeviceDescriptor;
"iPhone 13 Mini landscape": DeviceDescriptor;
- "JioPhone 2": DeviceDescriptor;
- "JioPhone 2 landscape": DeviceDescriptor;
"Kindle Fire HDX": DeviceDescriptor;
"Kindle Fire HDX landscape": DeviceDescriptor;
"LG Optimus L70": DeviceDescriptor;
diff --git a/utils/doclint/cli.js b/utils/doclint/cli.js
index 816d2ff1eb..073b98a8a9 100755
--- a/utils/doclint/cli.js
+++ b/utils/doclint/cli.js
@@ -141,6 +141,9 @@ async function run() {
break;
}
}
+ const invalidConfigurations = Object.entries(devicesDescriptors).filter(([_, deviceDescriptor]) => deviceDescriptor.isMobile && deviceDescriptor.defaultBrowserType === 'firefox').map(([deviceName, deviceDescriptor]) => deviceName);
+ if (invalidConfigurations.length > 0)
+ throw new Error(`Invalid Device Configurations. isMobile with Firefox not supported: ${invalidConfigurations.join(', ')}`);
writeAssumeNoop(devicesDescriptorsSourceFile, JSON.stringify(devicesDescriptors, null, 2), dirtyFiles);
}