From 89651bf45b21aad91e7dc1eb1cd1ab4b04ed9f88 Mon Sep 17 00:00:00 2001 From: Ali Alyamani Date: Fri, 28 Jul 2023 15:04:59 -0400 Subject: [PATCH] feat: add iPhone 14 devices --- .../src/server/deviceDescriptorsSource.json | 120 ++++++++++++++++++ packages/playwright-core/types/types.d.ts | 8 ++ 2 files changed, 128 insertions(+) diff --git a/packages/playwright-core/src/server/deviceDescriptorsSource.json b/packages/playwright-core/src/server/deviceDescriptorsSource.json index 923e00c37325a..7cf22cd866bf1 100644 --- a/packages/playwright-core/src/server/deviceDescriptorsSource.json +++ b/packages/playwright-core/src/server/deviceDescriptorsSource.json @@ -835,6 +835,126 @@ "hasTouch": true, "defaultBrowserType": "webkit" }, + "iPhone 14": { + "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1", + "screen": { + "width": 390, + "height": 844 + }, + "viewport": { + "width": 390, + "height": 664 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "webkit" + }, + "iPhone 14 landscape": { + "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1", + "screen": { + "width": 390, + "height": 844 + }, + "viewport": { + "width": 750, + "height": 340 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "webkit" + }, + "iPhone 14 Plus": { + "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1", + "screen": { + "width": 428, + "height": 926 + }, + "viewport": { + "width": 428, + "height": 746 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "webkit" + }, + "iPhone 14 Plus landscape": { + "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1", + "screen": { + "width": 428, + "height": 926 + }, + "viewport": { + "width": 832, + "height": 378 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "webkit" + }, + "iPhone 14 Pro": { + "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1", + "screen": { + "width": 393, + "height": 852 + }, + "viewport": { + "width": 393, + "height": 660 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "webkit" + }, + "iPhone 14 Pro landscape": { + "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1", + "screen": { + "width": 393, + "height": 852 + }, + "viewport": { + "width": 734, + "height": 343 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "webkit" + }, + "iPhone 14 Pro Max": { + "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1", + "screen": { + "width": 430, + "height": 932 + }, + "viewport": { + "width": 430, + "height": 740 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "webkit" + }, + "iPhone 14 Pro Max landscape": { + "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1", + "screen": { + "width": 430, + "height": 932 + }, + "viewport": { + "width": 814, + "height": 380 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "webkit" + }, "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 aeca2bae950fd..78cd32115c4ff 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -20011,6 +20011,14 @@ type Devices = { "iPhone 13 Pro Max landscape": DeviceDescriptor; "iPhone 13 Mini": DeviceDescriptor; "iPhone 13 Mini landscape": DeviceDescriptor; + "iPhone 14": DeviceDescriptor; + "iPhone 14 landscape": DeviceDescriptor; + "iPhone 14 Plus": DeviceDescriptor; + "iPhone 14 Plus landscape": DeviceDescriptor; + "iPhone 14 Pro": DeviceDescriptor; + "iPhone 14 Pro landscape": DeviceDescriptor; + "iPhone 14 Pro Max": DeviceDescriptor; + "iPhone 14 Pro Max landscape": DeviceDescriptor; "Kindle Fire HDX": DeviceDescriptor; "Kindle Fire HDX landscape": DeviceDescriptor; "LG Optimus L70": DeviceDescriptor;