@cloudscape-design/browser-test-tools 3.0.5 → 3.0.7
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/dist/page-objects/base.js +1 -0
- package/dist/use-browser.js +3 -4
- package/package.json +2 -2
|
@@ -108,6 +108,7 @@ class BasePageObject {
|
|
|
108
108
|
}
|
|
109
109
|
async windowScrollTo({ top = 0, left = 0 }) {
|
|
110
110
|
await this.browser.execute(browser_scripts_1.windowScrollTo, top, left);
|
|
111
|
+
await this.pause(100);
|
|
111
112
|
}
|
|
112
113
|
async getElementScroll(selector) {
|
|
113
114
|
return this.browser.execute(browser_scripts_1.getElementScrollPosition, selector);
|
package/dist/use-browser.js
CHANGED
|
@@ -4,9 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.configure = void 0;
|
|
7
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
8
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
9
|
-
const assert_1 = require("assert");
|
|
10
7
|
const browser_1 = __importDefault(require("./browser"));
|
|
11
8
|
const merge_1 = __importDefault(require("lodash/merge"));
|
|
12
9
|
const options = {
|
|
@@ -32,7 +29,9 @@ function useBrowser(...args) {
|
|
|
32
29
|
if ('getLogs' in browser) {
|
|
33
30
|
const logs = (await browser.getLogs('browser'));
|
|
34
31
|
const errors = logs.filter(entry => entry.level === 'SEVERE');
|
|
35
|
-
|
|
32
|
+
if (errors.length > 0) {
|
|
33
|
+
throw new Error('Unexpected errors in browser console:\n' + JSON.stringify(errors, null, 2));
|
|
34
|
+
}
|
|
36
35
|
}
|
|
37
36
|
else {
|
|
38
37
|
console.warn('Unable to check browser console, webdriver does not support this feature');
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/cloudscape-design/browser-test-tools/issues"
|
|
4
4
|
},
|
|
5
5
|
"bundleDependencies": false,
|
|
6
|
-
"commit": "
|
|
6
|
+
"commit": "db91c4a",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@types/pngjs": "^6.0.1",
|
|
9
9
|
"aws-sdk": "^2.1233.0",
|
|
@@ -59,6 +59,6 @@
|
|
|
59
59
|
"type": "git",
|
|
60
60
|
"url": "git+https://github.com/cloudscape-design/browser-test-tools.git"
|
|
61
61
|
},
|
|
62
|
-
"version": "3.0.
|
|
62
|
+
"version": "3.0.7",
|
|
63
63
|
"license": "Apache-2.0"
|
|
64
64
|
}
|