@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 and navigation, so we need to
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
- const addressBarHeight = iosAddressBarHeight * dimensions.pixelRatio;
55
- return statusBarHeight + addressBarHeight;
54
+ return statusBarHeight;
56
55
  }
57
56
  exports.calculateIosTopOffset = calculateIosTopOffset;
58
57
  async function getPuppeteer(browser) {
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "99e2f29b5763f5969d4ac1d321de01893d1c3eda"
2
+ "commit": "5cdea13328308afd7ca80471fd729da602817e0d"
3
3
  }
package/package.json CHANGED
@@ -60,6 +60,6 @@
60
60
  "type": "git",
61
61
  "url": "git+https://github.com/cloudscape-design/browser-test-tools.git"
62
62
  },
63
- "version": "3.0.23",
63
+ "version": "3.0.25",
64
64
  "license": "Apache-2.0"
65
65
  }