@cloudscape-design/browser-test-tools 3.0.125 → 3.0.126

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "1c6161c5514fc29761f33a857b1b5a2e74cf3d82"
2
+ "commit": "58e14cac690701fe8bc3d3e74cda9f038c29082b"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudscape-design/browser-test-tools",
3
- "version": "3.0.125",
3
+ "version": "3.0.126",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/cloudscape-design/browser-test-tools.git"
@@ -64,13 +64,13 @@ class ScreenshotPageObject extends base_1.default {
64
64
  // Adapt viewport height to fit all elements before taking a screenshot
65
65
  const originalWindowSize = await this.fitWindowHeightToContent();
66
66
  const permutations = await this.browser.execute(browser_scripts_1.getPermutationSizes);
67
- // Restore window size after taking the screenshot
68
- await this.safeSetWindowSize(originalWindowSize.width, originalWindowSize.height);
69
67
  if (permutations.length === 0) {
70
68
  throw new Error('No permutations found on current page.');
71
69
  }
72
70
  const screenshot = await this.fullPageScreenshot();
73
71
  const image = await (0, image_utils_1.parsePng)(screenshot);
72
+ // Restore window size after taking the screenshot
73
+ await this.safeSetWindowSize(originalWindowSize.width, originalWindowSize.height);
74
74
  return permutations.map((permutation) => ({ ...permutation, image }));
75
75
  }
76
76
  async fitWindowHeightToContent() {