@cloudscape-design/browser-test-tools 3.0.55 → 3.0.56

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.
@@ -9,6 +9,7 @@ exports.startWebdriver = exports.shutdownWebdriver = void 0;
9
9
  const child_process_1 = require("child_process");
10
10
  const exceptions_1 = require("./exceptions");
11
11
  const readline_1 = __importDefault(require("readline"));
12
+ const wait_on_1 = __importDefault(require("wait-on"));
12
13
  function spawnChromeDriver(port) {
13
14
  const params = [`--port=${port}`, '--log-level=SEVERE', '--path=/'];
14
15
  try {
@@ -27,8 +28,8 @@ function shutdownWebdriver() {
27
28
  }
28
29
  }
29
30
  exports.shutdownWebdriver = shutdownWebdriver;
30
- function startWebdriver(port = '9515') {
31
- return new Promise((resolve, reject) => {
31
+ async function startWebdriver(port = '9515') {
32
+ await new Promise((resolve, reject) => {
32
33
  webdriverProcess = spawnChromeDriver(port);
33
34
  webdriverProcess.on('error', error => {
34
35
  shutdownWebdriver();
@@ -48,5 +49,9 @@ function startWebdriver(port = '9515') {
48
49
  }
49
50
  });
50
51
  });
52
+ await (0, wait_on_1.default)({
53
+ resources: [`http-get://localhost:${port}/status`],
54
+ timeout: 10000,
55
+ });
51
56
  }
52
57
  exports.startWebdriver = startWebdriver;
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "4a25a08c09f9fc5459c3940da5332d7b8be2cdcf"
2
+ "commit": "db4aaaa85ecabe3ebc37eedf60b74e73d832258a"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudscape-design/browser-test-tools",
3
- "version": "3.0.55",
3
+ "version": "3.0.56",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/cloudscape-design/browser-test-tools.git"
@@ -23,6 +23,7 @@
23
23
  "p-retry": "^4.6.2",
24
24
  "pixelmatch": "^5.3.0",
25
25
  "pngjs": "^6.0.0",
26
+ "wait-on": "^7.2.0",
26
27
  "webdriverio": "^7.25.2"
27
28
  },
28
29
  "exports": {