@cloudscape-design/browser-test-tools 3.0.23 → 3.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11,8 +11,6 @@ function getElementCenter(rect) {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
exports.getElementCenter = getElementCenter;
|
|
14
|
-
// This is the pixel value *before* applying the device pixel ratio
|
|
15
|
-
const iosAddressBarHeight = 50;
|
|
16
14
|
// Device specific sizes for iOS devices. Models before iPhone X are covered by the default value.
|
|
17
15
|
// Viewport values taken from https://yesviz.com/iphones.php
|
|
18
16
|
const iosDeviceConfig = [
|
|
@@ -41,8 +39,10 @@ const iosDeviceConfig = [
|
|
|
41
39
|
statusBarHeight: 132,
|
|
42
40
|
},
|
|
43
41
|
];
|
|
44
|
-
// Screenshots on iOS include all iOS UI elements like toolbars
|
|
42
|
+
// Screenshots on iOS include all iOS UI elements like toolbars, so we need to
|
|
45
43
|
// cut them out of screenshots. This function provides relevant offsets.
|
|
44
|
+
// As of iOS 15, the navigation bar has moved to the bottom, so it's no longer
|
|
45
|
+
// relevant when calculating the top offset.
|
|
46
46
|
function calculateIosTopOffset(dimensions) {
|
|
47
47
|
const { screenWidth: width, screenHeight: height } = dimensions;
|
|
48
48
|
// Default height for most models before the iPhone X
|
|
@@ -51,8 +51,7 @@ function calculateIosTopOffset(dimensions) {
|
|
|
51
51
|
if (deviceConfig) {
|
|
52
52
|
statusBarHeight = deviceConfig.statusBarHeight;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
return statusBarHeight + addressBarHeight;
|
|
54
|
+
return statusBarHeight;
|
|
56
55
|
}
|
|
57
56
|
exports.calculateIosTopOffset = calculateIosTopOffset;
|
|
58
57
|
async function getPuppeteer(browser) {
|
package/internal/manifest.json
CHANGED