@cloudscape-design/browser-test-tools 3.0.129 → 3.0.130
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.
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -63,14 +63,14 @@ class ScreenshotPageObject extends base_1.default {
|
|
|
63
63
|
await this.windowScrollTo({ top: 0, left: 0 });
|
|
64
64
|
// Adapt viewport height to fit all elements before taking a screenshot
|
|
65
65
|
const originalWindowSize = await this.fitWindowHeightToContent();
|
|
66
|
-
const permutations = await this.browser.execute(browser_scripts_1.getPermutationSizes);
|
|
67
|
-
if (permutations.length === 0) {
|
|
68
|
-
throw new Error('No permutations found on current page.');
|
|
69
|
-
}
|
|
70
66
|
const screenshot = await this.fullPageScreenshot();
|
|
71
67
|
const image = await (0, image_utils_1.parsePng)(screenshot);
|
|
68
|
+
const permutations = await this.browser.execute(browser_scripts_1.getPermutationSizes);
|
|
72
69
|
// Restore window size after taking the screenshot
|
|
73
70
|
await this.safeSetWindowSize(originalWindowSize.width, originalWindowSize.height);
|
|
71
|
+
if (permutations.length === 0) {
|
|
72
|
+
throw new Error('No permutations found on current page.');
|
|
73
|
+
}
|
|
74
74
|
return permutations.map((permutation) => ({ ...permutation, image }));
|
|
75
75
|
}
|
|
76
76
|
async fitWindowHeightToContent() {
|