@testim/testim-cli 3.271.0 → 3.273.0
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/agent/routers/cliJsCode/router.js +1 -2
- package/cli.js +0 -1
- package/codim/measure-perf.js +0 -4
- package/commons/httpRequest.js +1 -1
- package/commons/initializeUserWithAuth.js +13 -14
- package/commons/performance-logger.js +0 -7
- package/commons/testimCustomToken.js +7 -10
- package/commons/testimServicesApi.js +1 -1
- package/errors.js +3 -6
- package/npm-shrinkwrap.json +96 -144
- package/package.json +2 -4
- package/player/WebdriverioWebDriverApi.js +0 -1
- package/player/services/tabService.js +2 -2
- package/player/stepActions/baseCliJsStepAction.js +1 -1
- package/player/utils/stepActionUtils.js +1 -1
- package/player/webdriver.js +14 -26
- package/runOptions.d.ts +1 -1
- package/services/labFeaturesService.js +2 -2
- package/stepPlayers/cliJsStepPlayback.js +1 -1
- package/utils/promiseUtils.js +9 -15
- package/workers/WorkerAppium.js +2 -2
- package/bluebirdConfig.js +0 -38
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
const { TimeoutError } = require('bluebird');
|
|
6
5
|
const express = require('express');
|
|
7
6
|
const service = require('./service');
|
|
8
|
-
const { NpmPackageError } = require('../../../errors');
|
|
7
|
+
const { NpmPackageError, TimeoutError } = require('../../../errors');
|
|
9
8
|
const logger = require('../../../commons/logger').getLogger('cli-router');
|
|
10
9
|
const chalk = require('chalk');
|
|
11
10
|
|
package/cli.js
CHANGED
package/codim/measure-perf.js
CHANGED
package/commons/httpRequest.js
CHANGED
|
@@ -98,7 +98,7 @@ function postFullRes(url, body, headers = {}, timeout = DEFAULT_REQUEST_TIMEOUT,
|
|
|
98
98
|
request.retry(retry);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
return promiseFromCallback((callback) => request.end(callback)).catch(e =>
|
|
101
|
+
return promiseFromCallback((callback) => request.end(callback)).catch(e => {
|
|
102
102
|
e.url = url;
|
|
103
103
|
e.originalRequestTimeout = timeout;
|
|
104
104
|
e.additionalSetHeaders = headers;
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
|
|
2
1
|
const perf = require('./performance-logger');
|
|
3
|
-
const localRunnerCache = require('./runnerFileCache');
|
|
4
2
|
const servicesApi = require('./testimServicesApi');
|
|
3
|
+
const localRunnerCache = require('./runnerFileCache');
|
|
5
4
|
const testimCustomToken = require('./testimCustomToken');
|
|
6
5
|
const { CLI_MODE } = require('./constants');
|
|
7
6
|
|
|
8
7
|
const FIVE_MINUTES_MS = 1000 * 60 * 5;
|
|
9
8
|
const TEN_HOURS_MS = 1000 * 60 * 60 * 10;
|
|
10
9
|
|
|
10
|
+
/** @param {import('../runOptions').RunnerOptions['mode']} mode */
|
|
11
11
|
function preloadSlowRequires(mode) {
|
|
12
12
|
process.nextTick(() => {
|
|
13
|
+
if (![CLI_MODE.SELENIUM, CLI_MODE.APPIUM].includes(mode)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
13
16
|
// heuristic to pay the cost of loading the sessionPlayer here while we are waiting for the backend
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
//silent catch
|
|
22
|
-
}
|
|
17
|
+
try {
|
|
18
|
+
require('./getSessionPlayerRequire');
|
|
19
|
+
// jsdom for the same reason, we don't require workerSelenium here since it actually takes longer to load
|
|
20
|
+
// then it takes for the backend to return 🤯
|
|
21
|
+
require('jsdom');
|
|
22
|
+
} catch (e) {
|
|
23
|
+
//silent catch
|
|
23
24
|
}
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
/**
|
|
28
|
-
* @param {import('../runOptions').RunnerOptions} options
|
|
29
|
-
*/
|
|
28
|
+
/** @param {import('../runOptions').RunnerOptions} options */
|
|
30
29
|
async function initializeUserWithAuth(options) {
|
|
31
30
|
const { project, token, lightweightMode, useLocalChromeDriver, useChromeLauncher, mode } = options;
|
|
32
31
|
|
|
@@ -38,13 +38,6 @@ module.exports = {
|
|
|
38
38
|
return v;
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
// patch Promise.prototype to contain a log method
|
|
42
|
-
require('bluebird').prototype.log = function log(message) {
|
|
43
|
-
if (!MEASURE_TESTIM_CLI_PERFORMANCE) {
|
|
44
|
-
return this;
|
|
45
|
-
}
|
|
46
|
-
return this.tap(() => module.exports.log(message));
|
|
47
|
-
};
|
|
48
41
|
},
|
|
49
42
|
measureRequireTimes() {
|
|
50
43
|
if (!MEASURE_TESTIM_CLI_PERFORMANCE) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const Promise = require('bluebird');
|
|
4
3
|
const httpRequest = require('./httpRequest');
|
|
5
4
|
const config = require('./config');
|
|
6
5
|
const ArgError = require('../errors').ArgError;
|
|
@@ -18,7 +17,6 @@ let _token = null;
|
|
|
18
17
|
|
|
19
18
|
const FIVE_MIN_IN_MS = 5 * 60 * 1000;
|
|
20
19
|
|
|
21
|
-
|
|
22
20
|
async function init(projectId, token) {
|
|
23
21
|
_projectId = projectId;
|
|
24
22
|
_token = token;
|
|
@@ -26,7 +24,6 @@ async function init(projectId, token) {
|
|
|
26
24
|
return tokenValue;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
|
-
|
|
30
27
|
function initFromData(authData, projectId, token) {
|
|
31
28
|
_serverToken = authData.token;
|
|
32
29
|
_projectId = projectId;
|
|
@@ -69,14 +66,14 @@ function generateToken() {
|
|
|
69
66
|
_isNgrokWhitelisted = customToken.isNgrokWhitelisted;
|
|
70
67
|
return _serverToken;
|
|
71
68
|
})
|
|
72
|
-
.catch(error => error.message.includes('Unauthorized'), () => {
|
|
73
|
-
throw new ArgError(
|
|
74
|
-
'Error trying to retrieve CLI token. ' +
|
|
75
|
-
'Your CLI token and project might not match. ' +
|
|
76
|
-
'Please make sure to pass `--project` and `--token` that' +
|
|
77
|
-
' match to each other or make sure they match in your ~/.testim file.');
|
|
78
|
-
})
|
|
79
69
|
.catch(error => {
|
|
70
|
+
if (error.message.includes('Unauthorized')) {
|
|
71
|
+
throw new ArgError(
|
|
72
|
+
'Error trying to retrieve CLI token. ' +
|
|
73
|
+
'Your CLI token and project might not match. ' +
|
|
74
|
+
'Please make sure to pass `--project` and `--token` that' +
|
|
75
|
+
' match to each other or make sure they match in your ~/.testim file.');
|
|
76
|
+
}
|
|
80
77
|
logger.error(`While trying to retrieve CLI token. caught error: ${error}`, { projectId: _projectId });
|
|
81
78
|
throw new ArgError(`While trying to retrieve CLI token, caught error: ${error}`);
|
|
82
79
|
});
|
|
@@ -455,7 +455,7 @@ async function uploadArtifact(projectId, testId, testResultId, content, subType,
|
|
|
455
455
|
|
|
456
456
|
await pRetry(
|
|
457
457
|
() => postAuthFormData(`/storage${storagePath}`, {}, files, { 'X-Asset-Encoding': 'gzip' }),
|
|
458
|
-
{ retries: DEFAULT_REQUEST_RETRY, factor: 1 }
|
|
458
|
+
{ retries: DEFAULT_REQUEST_RETRY, factor: 1 },
|
|
459
459
|
);
|
|
460
460
|
return storagePath;
|
|
461
461
|
}
|
package/errors.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const { AbortError } = require('p-retry');
|
|
2
|
-
const { TimeoutError: _TimeoutError } = require('bluebird');
|
|
3
2
|
/**
|
|
4
3
|
* NoArgsError - throws when arguments not passed to cli
|
|
5
4
|
*
|
|
@@ -59,13 +58,11 @@ class GetBrowserError extends Error {
|
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
|
|
62
|
-
class PageNotAvailableError extends AbortError {
|
|
63
|
-
}
|
|
61
|
+
class PageNotAvailableError extends AbortError {}
|
|
64
62
|
|
|
65
|
-
class TimeoutError extends
|
|
66
|
-
}
|
|
63
|
+
class TimeoutError extends Error {}
|
|
67
64
|
|
|
68
|
-
class QuotaDepletedError extends Error {
|
|
65
|
+
class QuotaDepletedError extends Error {}
|
|
69
66
|
|
|
70
67
|
class GridError extends Error {
|
|
71
68
|
constructor(message) {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testim/testim-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.273.0",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@testim/testim-cli",
|
|
9
|
-
"version": "3.
|
|
9
|
+
"version": "3.273.0",
|
|
10
10
|
"license": "Proprietary",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@applitools/eyes-sdk-core": "13.11.21",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"analytics-node": "5.0.0",
|
|
18
18
|
"appium-dom-utils": "1.0.6",
|
|
19
19
|
"archiver": "5.3.0",
|
|
20
|
-
"bluebird": "3.7.2",
|
|
21
20
|
"body-parser": "1.19.1",
|
|
22
21
|
"chalk": "4.1.2",
|
|
23
22
|
"chrome-launcher": "0.15.0",
|
|
@@ -38,7 +37,7 @@
|
|
|
38
37
|
"istanbul-reports": "3.0.2",
|
|
39
38
|
"jimp": "0.16.2",
|
|
40
39
|
"jsdom": "19.0.0",
|
|
41
|
-
"jsonwebtoken": "
|
|
40
|
+
"jsonwebtoken": "9.0.0",
|
|
42
41
|
"lodash": "4.17.21",
|
|
43
42
|
"memory-fs": "0.5.0",
|
|
44
43
|
"memorystream": "0.3.1",
|
|
@@ -76,7 +75,6 @@
|
|
|
76
75
|
"testim": "cli.js"
|
|
77
76
|
},
|
|
78
77
|
"devDependencies": {
|
|
79
|
-
"@types/bluebird": "3.5.32",
|
|
80
78
|
"@types/fs-extra": "9.0.13",
|
|
81
79
|
"@types/ms": "0.7.31",
|
|
82
80
|
"@types/node": "10.17.24",
|
|
@@ -1224,12 +1222,6 @@
|
|
|
1224
1222
|
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz",
|
|
1225
1223
|
"integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q=="
|
|
1226
1224
|
},
|
|
1227
|
-
"node_modules/@types/bluebird": {
|
|
1228
|
-
"version": "3.5.32",
|
|
1229
|
-
"resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.32.tgz",
|
|
1230
|
-
"integrity": "sha512-dIOxFfI0C+jz89g6lQ+TqhGgPQ0MxSnh/E4xuC0blhFtyW269+mPG5QeLgbdwst/LvdP8o1y0o/Gz5EHXLec/g==",
|
|
1231
|
-
"dev": true
|
|
1232
|
-
},
|
|
1233
1225
|
"node_modules/@types/cacheable-request": {
|
|
1234
1226
|
"version": "6.0.3",
|
|
1235
1227
|
"resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",
|
|
@@ -1460,9 +1452,9 @@
|
|
|
1460
1452
|
}
|
|
1461
1453
|
},
|
|
1462
1454
|
"node_modules/@wdio/types/node_modules/@types/node": {
|
|
1463
|
-
"version": "18.11.
|
|
1464
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.
|
|
1465
|
-
"integrity": "sha512-
|
|
1455
|
+
"version": "18.11.18",
|
|
1456
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
|
|
1457
|
+
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA=="
|
|
1466
1458
|
},
|
|
1467
1459
|
"node_modules/@wdio/utils": {
|
|
1468
1460
|
"version": "7.24.0",
|
|
@@ -2498,11 +2490,6 @@
|
|
|
2498
2490
|
"readable-stream": "^3.4.0"
|
|
2499
2491
|
}
|
|
2500
2492
|
},
|
|
2501
|
-
"node_modules/bluebird": {
|
|
2502
|
-
"version": "3.7.2",
|
|
2503
|
-
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
|
|
2504
|
-
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
|
|
2505
|
-
},
|
|
2506
2493
|
"node_modules/bmp-js": {
|
|
2507
2494
|
"version": "0.1.0",
|
|
2508
2495
|
"resolved": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.1.0.tgz",
|
|
@@ -4411,9 +4398,9 @@
|
|
|
4411
4398
|
"integrity": "sha512-+iipnm2hvmlWs4MVNx7HwSTxhDxsXnQyK5F1OalZVXeUhdPgP/23T42NCyg0TK3wL/Yg92SVrSuGKqdg12o54w=="
|
|
4412
4399
|
},
|
|
4413
4400
|
"node_modules/devtools/node_modules/@types/node": {
|
|
4414
|
-
"version": "18.11.
|
|
4415
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.
|
|
4416
|
-
"integrity": "sha512-
|
|
4401
|
+
"version": "18.11.18",
|
|
4402
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
|
|
4403
|
+
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA=="
|
|
4417
4404
|
},
|
|
4418
4405
|
"node_modules/devtools/node_modules/ua-parser-js": {
|
|
4419
4406
|
"version": "1.0.32",
|
|
@@ -7722,9 +7709,9 @@
|
|
|
7722
7709
|
"integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="
|
|
7723
7710
|
},
|
|
7724
7711
|
"node_modules/json5": {
|
|
7725
|
-
"version": "1.0.
|
|
7726
|
-
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.
|
|
7727
|
-
"integrity": "sha512-
|
|
7712
|
+
"version": "1.0.2",
|
|
7713
|
+
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
|
7714
|
+
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
|
7728
7715
|
"dev": true,
|
|
7729
7716
|
"dependencies": {
|
|
7730
7717
|
"minimist": "^1.2.0"
|
|
@@ -7754,34 +7741,50 @@
|
|
|
7754
7741
|
}
|
|
7755
7742
|
},
|
|
7756
7743
|
"node_modules/jsonwebtoken": {
|
|
7757
|
-
"version": "
|
|
7758
|
-
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-
|
|
7759
|
-
"integrity": "sha512-
|
|
7744
|
+
"version": "9.0.0",
|
|
7745
|
+
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz",
|
|
7746
|
+
"integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==",
|
|
7760
7747
|
"dependencies": {
|
|
7761
7748
|
"jws": "^3.2.2",
|
|
7762
|
-
"lodash
|
|
7763
|
-
"lodash.isboolean": "^3.0.3",
|
|
7764
|
-
"lodash.isinteger": "^4.0.4",
|
|
7765
|
-
"lodash.isnumber": "^3.0.3",
|
|
7766
|
-
"lodash.isplainobject": "^4.0.6",
|
|
7767
|
-
"lodash.isstring": "^4.0.1",
|
|
7768
|
-
"lodash.once": "^4.0.0",
|
|
7749
|
+
"lodash": "^4.17.21",
|
|
7769
7750
|
"ms": "^2.1.1",
|
|
7770
|
-
"semver": "^
|
|
7751
|
+
"semver": "^7.3.8"
|
|
7771
7752
|
},
|
|
7772
7753
|
"engines": {
|
|
7773
|
-
"node": ">=
|
|
7774
|
-
"npm": ">=
|
|
7754
|
+
"node": ">=12",
|
|
7755
|
+
"npm": ">=6"
|
|
7756
|
+
}
|
|
7757
|
+
},
|
|
7758
|
+
"node_modules/jsonwebtoken/node_modules/lru-cache": {
|
|
7759
|
+
"version": "6.0.0",
|
|
7760
|
+
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
|
7761
|
+
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
|
7762
|
+
"dependencies": {
|
|
7763
|
+
"yallist": "^4.0.0"
|
|
7764
|
+
},
|
|
7765
|
+
"engines": {
|
|
7766
|
+
"node": ">=10"
|
|
7775
7767
|
}
|
|
7776
7768
|
},
|
|
7777
7769
|
"node_modules/jsonwebtoken/node_modules/semver": {
|
|
7778
|
-
"version": "
|
|
7779
|
-
"resolved": "https://registry.npmjs.org/semver/-/semver-
|
|
7780
|
-
"integrity": "sha512-
|
|
7770
|
+
"version": "7.3.8",
|
|
7771
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
|
7772
|
+
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
|
7773
|
+
"dependencies": {
|
|
7774
|
+
"lru-cache": "^6.0.0"
|
|
7775
|
+
},
|
|
7781
7776
|
"bin": {
|
|
7782
|
-
"semver": "bin/semver"
|
|
7777
|
+
"semver": "bin/semver.js"
|
|
7778
|
+
},
|
|
7779
|
+
"engines": {
|
|
7780
|
+
"node": ">=10"
|
|
7783
7781
|
}
|
|
7784
7782
|
},
|
|
7783
|
+
"node_modules/jsonwebtoken/node_modules/yallist": {
|
|
7784
|
+
"version": "4.0.0",
|
|
7785
|
+
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
|
7786
|
+
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
|
7787
|
+
},
|
|
7785
7788
|
"node_modules/jsprim": {
|
|
7786
7789
|
"version": "1.4.2",
|
|
7787
7790
|
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
|
|
@@ -8080,26 +8083,6 @@
|
|
|
8080
8083
|
"integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==",
|
|
8081
8084
|
"dev": true
|
|
8082
8085
|
},
|
|
8083
|
-
"node_modules/lodash.includes": {
|
|
8084
|
-
"version": "4.3.0",
|
|
8085
|
-
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
|
|
8086
|
-
"integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
|
|
8087
|
-
},
|
|
8088
|
-
"node_modules/lodash.isboolean": {
|
|
8089
|
-
"version": "3.0.3",
|
|
8090
|
-
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
|
|
8091
|
-
"integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
|
|
8092
|
-
},
|
|
8093
|
-
"node_modules/lodash.isinteger": {
|
|
8094
|
-
"version": "4.0.4",
|
|
8095
|
-
"resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
|
|
8096
|
-
"integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
|
|
8097
|
-
},
|
|
8098
|
-
"node_modules/lodash.isnumber": {
|
|
8099
|
-
"version": "3.0.3",
|
|
8100
|
-
"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
|
|
8101
|
-
"integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
|
|
8102
|
-
},
|
|
8103
8086
|
"node_modules/lodash.isobject": {
|
|
8104
8087
|
"version": "3.0.2",
|
|
8105
8088
|
"resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz",
|
|
@@ -8125,11 +8108,6 @@
|
|
|
8125
8108
|
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
|
|
8126
8109
|
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
|
|
8127
8110
|
},
|
|
8128
|
-
"node_modules/lodash.once": {
|
|
8129
|
-
"version": "4.1.1",
|
|
8130
|
-
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
|
|
8131
|
-
"integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
|
|
8132
|
-
},
|
|
8133
8111
|
"node_modules/lodash.sortby": {
|
|
8134
8112
|
"version": "4.7.0",
|
|
8135
8113
|
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
|
|
@@ -13327,9 +13305,9 @@
|
|
|
13327
13305
|
}
|
|
13328
13306
|
},
|
|
13329
13307
|
"node_modules/safe-stable-stringify": {
|
|
13330
|
-
"version": "2.4.
|
|
13331
|
-
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.
|
|
13332
|
-
"integrity": "sha512-
|
|
13308
|
+
"version": "2.4.2",
|
|
13309
|
+
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.2.tgz",
|
|
13310
|
+
"integrity": "sha512-gMxvPJYhP0O9n2pvcfYfIuYgbledAOJFcqRThtPRmjscaipiwcwPPKLytpVzMkG2HAN87Qmo2d4PtGiri1dSLA==",
|
|
13333
13311
|
"engines": {
|
|
13334
13312
|
"node": ">=10"
|
|
13335
13313
|
}
|
|
@@ -15442,9 +15420,9 @@
|
|
|
15442
15420
|
}
|
|
15443
15421
|
},
|
|
15444
15422
|
"node_modules/webdriver/node_modules/@types/node": {
|
|
15445
|
-
"version": "18.11.
|
|
15446
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.
|
|
15447
|
-
"integrity": "sha512-
|
|
15423
|
+
"version": "18.11.18",
|
|
15424
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
|
|
15425
|
+
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA=="
|
|
15448
15426
|
},
|
|
15449
15427
|
"node_modules/webdriverio": {
|
|
15450
15428
|
"version": "7.24.0",
|
|
@@ -15484,9 +15462,9 @@
|
|
|
15484
15462
|
}
|
|
15485
15463
|
},
|
|
15486
15464
|
"node_modules/webdriverio/node_modules/@types/node": {
|
|
15487
|
-
"version": "18.11.
|
|
15488
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.
|
|
15489
|
-
"integrity": "sha512-
|
|
15465
|
+
"version": "18.11.18",
|
|
15466
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
|
|
15467
|
+
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA=="
|
|
15490
15468
|
},
|
|
15491
15469
|
"node_modules/webdriverio/node_modules/brace-expansion": {
|
|
15492
15470
|
"version": "2.0.1",
|
|
@@ -16899,12 +16877,6 @@
|
|
|
16899
16877
|
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz",
|
|
16900
16878
|
"integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q=="
|
|
16901
16879
|
},
|
|
16902
|
-
"@types/bluebird": {
|
|
16903
|
-
"version": "3.5.32",
|
|
16904
|
-
"resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.32.tgz",
|
|
16905
|
-
"integrity": "sha512-dIOxFfI0C+jz89g6lQ+TqhGgPQ0MxSnh/E4xuC0blhFtyW269+mPG5QeLgbdwst/LvdP8o1y0o/Gz5EHXLec/g==",
|
|
16906
|
-
"dev": true
|
|
16907
|
-
},
|
|
16908
16880
|
"@types/cacheable-request": {
|
|
16909
16881
|
"version": "6.0.3",
|
|
16910
16882
|
"resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",
|
|
@@ -17098,9 +17070,9 @@
|
|
|
17098
17070
|
},
|
|
17099
17071
|
"dependencies": {
|
|
17100
17072
|
"@types/node": {
|
|
17101
|
-
"version": "18.11.
|
|
17102
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.
|
|
17103
|
-
"integrity": "sha512-
|
|
17073
|
+
"version": "18.11.18",
|
|
17074
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
|
|
17075
|
+
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA=="
|
|
17104
17076
|
}
|
|
17105
17077
|
}
|
|
17106
17078
|
},
|
|
@@ -17914,11 +17886,6 @@
|
|
|
17914
17886
|
"readable-stream": "^3.4.0"
|
|
17915
17887
|
}
|
|
17916
17888
|
},
|
|
17917
|
-
"bluebird": {
|
|
17918
|
-
"version": "3.7.2",
|
|
17919
|
-
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
|
|
17920
|
-
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
|
|
17921
|
-
},
|
|
17922
17889
|
"bmp-js": {
|
|
17923
17890
|
"version": "0.1.0",
|
|
17924
17891
|
"resolved": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.1.0.tgz",
|
|
@@ -19460,9 +19427,9 @@
|
|
|
19460
19427
|
},
|
|
19461
19428
|
"dependencies": {
|
|
19462
19429
|
"@types/node": {
|
|
19463
|
-
"version": "18.11.
|
|
19464
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.
|
|
19465
|
-
"integrity": "sha512-
|
|
19430
|
+
"version": "18.11.18",
|
|
19431
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
|
|
19432
|
+
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA=="
|
|
19466
19433
|
},
|
|
19467
19434
|
"ua-parser-js": {
|
|
19468
19435
|
"version": "1.0.32",
|
|
@@ -22041,9 +22008,9 @@
|
|
|
22041
22008
|
"integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="
|
|
22042
22009
|
},
|
|
22043
22010
|
"json5": {
|
|
22044
|
-
"version": "1.0.
|
|
22045
|
-
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.
|
|
22046
|
-
"integrity": "sha512-
|
|
22011
|
+
"version": "1.0.2",
|
|
22012
|
+
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
|
22013
|
+
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
|
22047
22014
|
"dev": true,
|
|
22048
22015
|
"requires": {
|
|
22049
22016
|
"minimist": "^1.2.0"
|
|
@@ -22067,26 +22034,36 @@
|
|
|
22067
22034
|
}
|
|
22068
22035
|
},
|
|
22069
22036
|
"jsonwebtoken": {
|
|
22070
|
-
"version": "
|
|
22071
|
-
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-
|
|
22072
|
-
"integrity": "sha512-
|
|
22037
|
+
"version": "9.0.0",
|
|
22038
|
+
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz",
|
|
22039
|
+
"integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==",
|
|
22073
22040
|
"requires": {
|
|
22074
22041
|
"jws": "^3.2.2",
|
|
22075
|
-
"lodash
|
|
22076
|
-
"lodash.isboolean": "^3.0.3",
|
|
22077
|
-
"lodash.isinteger": "^4.0.4",
|
|
22078
|
-
"lodash.isnumber": "^3.0.3",
|
|
22079
|
-
"lodash.isplainobject": "^4.0.6",
|
|
22080
|
-
"lodash.isstring": "^4.0.1",
|
|
22081
|
-
"lodash.once": "^4.0.0",
|
|
22042
|
+
"lodash": "^4.17.21",
|
|
22082
22043
|
"ms": "^2.1.1",
|
|
22083
|
-
"semver": "^
|
|
22044
|
+
"semver": "^7.3.8"
|
|
22084
22045
|
},
|
|
22085
22046
|
"dependencies": {
|
|
22047
|
+
"lru-cache": {
|
|
22048
|
+
"version": "6.0.0",
|
|
22049
|
+
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
|
22050
|
+
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
|
22051
|
+
"requires": {
|
|
22052
|
+
"yallist": "^4.0.0"
|
|
22053
|
+
}
|
|
22054
|
+
},
|
|
22086
22055
|
"semver": {
|
|
22087
|
-
"version": "
|
|
22088
|
-
"resolved": "https://registry.npmjs.org/semver/-/semver-
|
|
22089
|
-
"integrity": "sha512-
|
|
22056
|
+
"version": "7.3.8",
|
|
22057
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
|
22058
|
+
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
|
22059
|
+
"requires": {
|
|
22060
|
+
"lru-cache": "^6.0.0"
|
|
22061
|
+
}
|
|
22062
|
+
},
|
|
22063
|
+
"yallist": {
|
|
22064
|
+
"version": "4.0.0",
|
|
22065
|
+
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
|
22066
|
+
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
|
22090
22067
|
}
|
|
22091
22068
|
}
|
|
22092
22069
|
},
|
|
@@ -22349,26 +22326,6 @@
|
|
|
22349
22326
|
"integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==",
|
|
22350
22327
|
"dev": true
|
|
22351
22328
|
},
|
|
22352
|
-
"lodash.includes": {
|
|
22353
|
-
"version": "4.3.0",
|
|
22354
|
-
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
|
|
22355
|
-
"integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
|
|
22356
|
-
},
|
|
22357
|
-
"lodash.isboolean": {
|
|
22358
|
-
"version": "3.0.3",
|
|
22359
|
-
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
|
|
22360
|
-
"integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
|
|
22361
|
-
},
|
|
22362
|
-
"lodash.isinteger": {
|
|
22363
|
-
"version": "4.0.4",
|
|
22364
|
-
"resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
|
|
22365
|
-
"integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
|
|
22366
|
-
},
|
|
22367
|
-
"lodash.isnumber": {
|
|
22368
|
-
"version": "3.0.3",
|
|
22369
|
-
"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
|
|
22370
|
-
"integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
|
|
22371
|
-
},
|
|
22372
22329
|
"lodash.isobject": {
|
|
22373
22330
|
"version": "3.0.2",
|
|
22374
22331
|
"resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz",
|
|
@@ -22394,11 +22351,6 @@
|
|
|
22394
22351
|
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
|
|
22395
22352
|
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
|
|
22396
22353
|
},
|
|
22397
|
-
"lodash.once": {
|
|
22398
|
-
"version": "4.1.1",
|
|
22399
|
-
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
|
|
22400
|
-
"integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
|
|
22401
|
-
},
|
|
22402
22354
|
"lodash.sortby": {
|
|
22403
22355
|
"version": "4.7.0",
|
|
22404
22356
|
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
|
|
@@ -26220,9 +26172,9 @@
|
|
|
26220
26172
|
}
|
|
26221
26173
|
},
|
|
26222
26174
|
"safe-stable-stringify": {
|
|
26223
|
-
"version": "2.4.
|
|
26224
|
-
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.
|
|
26225
|
-
"integrity": "sha512-
|
|
26175
|
+
"version": "2.4.2",
|
|
26176
|
+
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.2.tgz",
|
|
26177
|
+
"integrity": "sha512-gMxvPJYhP0O9n2pvcfYfIuYgbledAOJFcqRThtPRmjscaipiwcwPPKLytpVzMkG2HAN87Qmo2d4PtGiri1dSLA=="
|
|
26226
26178
|
},
|
|
26227
26179
|
"safer-buffer": {
|
|
26228
26180
|
"version": "2.1.2",
|
|
@@ -27937,9 +27889,9 @@
|
|
|
27937
27889
|
},
|
|
27938
27890
|
"dependencies": {
|
|
27939
27891
|
"@types/node": {
|
|
27940
|
-
"version": "18.11.
|
|
27941
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.
|
|
27942
|
-
"integrity": "sha512-
|
|
27892
|
+
"version": "18.11.18",
|
|
27893
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
|
|
27894
|
+
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA=="
|
|
27943
27895
|
}
|
|
27944
27896
|
}
|
|
27945
27897
|
},
|
|
@@ -27978,9 +27930,9 @@
|
|
|
27978
27930
|
},
|
|
27979
27931
|
"dependencies": {
|
|
27980
27932
|
"@types/node": {
|
|
27981
|
-
"version": "18.11.
|
|
27982
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.
|
|
27983
|
-
"integrity": "sha512-
|
|
27933
|
+
"version": "18.11.18",
|
|
27934
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
|
|
27935
|
+
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA=="
|
|
27984
27936
|
},
|
|
27985
27937
|
"brace-expansion": {
|
|
27986
27938
|
"version": "2.0.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testim/testim-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.273.0",
|
|
4
4
|
"description": "Command line interface for running Testing on your CI",
|
|
5
5
|
"author": "Oren Rubin",
|
|
6
6
|
"contributors": [{
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"email": "info@testim.io"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@types/bluebird": "3.5.32",
|
|
15
14
|
"@types/fs-extra": "9.0.13",
|
|
16
15
|
"@types/ms": "0.7.31",
|
|
17
16
|
"@types/node": "10.17.24",
|
|
@@ -51,7 +50,6 @@
|
|
|
51
50
|
"analytics-node": "5.0.0",
|
|
52
51
|
"appium-dom-utils": "1.0.6",
|
|
53
52
|
"archiver": "5.3.0",
|
|
54
|
-
"bluebird": "3.7.2",
|
|
55
53
|
"body-parser": "1.19.1",
|
|
56
54
|
"chalk": "4.1.2",
|
|
57
55
|
"chrome-launcher": "0.15.0",
|
|
@@ -72,7 +70,7 @@
|
|
|
72
70
|
"istanbul-reports": "3.0.2",
|
|
73
71
|
"jimp": "0.16.2",
|
|
74
72
|
"jsdom": "19.0.0",
|
|
75
|
-
"jsonwebtoken": "
|
|
73
|
+
"jsonwebtoken": "9.0.0",
|
|
76
74
|
"lodash": "4.17.21",
|
|
77
75
|
"memory-fs": "0.5.0",
|
|
78
76
|
"memorystream": "0.3.1",
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
const webdriverio = require('@testim/webdriverio');
|
|
4
4
|
const Queue = require('promise-queue');
|
|
5
|
-
const Promise = require('bluebird');
|
|
6
5
|
const config = require('../commons/config');
|
|
7
6
|
const { UNICODE_CHARACTERS, W3C_ELEMENT_ID } = require('./constants');
|
|
8
7
|
const isElementDisplayed = require('./scripts/isElementDisplayed');
|
|
@@ -367,7 +367,7 @@ class TabService {
|
|
|
367
367
|
this.sessionTabs[sessionId].tabCount = 1;
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
-
switchTab(tabId, sessionId, { forceSwitch } = {
|
|
370
|
+
switchTab(tabId, sessionId, { forceSwitch = false } = {}) {
|
|
371
371
|
const tabCount = this.sessionTabs[sessionId] ? this.sessionTabs[sessionId].tabCount : 1;
|
|
372
372
|
// looking at session tabs here and tabCount only works if we already "know" all the tabs, so we
|
|
373
373
|
// opt out of it in hybrid steps and other cases.
|
|
@@ -385,7 +385,7 @@ class TabService {
|
|
|
385
385
|
}
|
|
386
386
|
let mainTabPromise = Promise.resolve('unknown');
|
|
387
387
|
if (options.checkForMainTab) {
|
|
388
|
-
mainTabPromise = this.driver.executeJS('return window.__isMainTestimTab').
|
|
388
|
+
mainTabPromise = this.driver.executeJS('return window.__isMainTestimTab').then(r => r.value);
|
|
389
389
|
}
|
|
390
390
|
|
|
391
391
|
return Promise.all([this.driver.getTitle(), this.driver.getUrl(), mainTabPromise]).then(
|
|
@@ -12,7 +12,7 @@ class BaseCliJsStepAction extends BaseJsStepAction {
|
|
|
12
12
|
async executeCliCode() {
|
|
13
13
|
const { step, context } = this;
|
|
14
14
|
const isMobile = this.stepActionUtils.driver.isMobile;
|
|
15
|
-
const hasCliAction =
|
|
15
|
+
const hasCliAction = context.company?.activePlan?.premiumFeatures?.cliAction;
|
|
16
16
|
|
|
17
17
|
if (!hasCliAction && !isMobile) {
|
|
18
18
|
return {
|
package/player/webdriver.js
CHANGED
|
@@ -6,7 +6,7 @@ const _ = require('lodash');
|
|
|
6
6
|
const logger = require('../commons/logger').getLogger('webdriver');
|
|
7
7
|
const parser = require('ua-parser-js');
|
|
8
8
|
const desiredCapabilitiesBuilder = require('../commons/testimDesiredCapabilitiesBuilder');
|
|
9
|
-
const { SeleniumError, SeleniumCrashError
|
|
9
|
+
const { SeleniumError, SeleniumCrashError } = require('../errors');
|
|
10
10
|
const utils = require('../utils');
|
|
11
11
|
const WebDriverApi = require('./WebdriverioWebDriverApi');
|
|
12
12
|
const doubleClick = require('./stepActions/scripts/doubleClick');
|
|
@@ -70,7 +70,7 @@ class WebDriver extends WebDriverApi {
|
|
|
70
70
|
// eslint-disable-next-line max-len, default-param-last
|
|
71
71
|
async init(browserOptions, testName, testRunConfig, gridInfo, customExtensionLocalLocation, executionId, testResultId, seleniumPerfStats = new SeleniumPerfStats(), fastInit = false, lambdatestService) {
|
|
72
72
|
this.browserClosedFailedKeepAlives = 0;
|
|
73
|
-
this.ignoreHiddenTagsText =
|
|
73
|
+
this.ignoreHiddenTagsText = browserOptions?.company?.activePlan?.premiumFeatures?.ignoreHiddenTagsText;
|
|
74
74
|
this.browserClosedCallbacks = [];
|
|
75
75
|
// eslint-disable-next-line max-len
|
|
76
76
|
const capabilities = desiredCapabilitiesBuilder.buildSeleniumOptions(browserOptions, testName, testRunConfig, gridInfo, customExtensionLocalLocation, executionId, testResultId, lambdatestService);
|
|
@@ -99,7 +99,7 @@ class WebDriver extends WebDriverApi {
|
|
|
99
99
|
logger.error('failed to init webdriver', { err });
|
|
100
100
|
if (err.seleniumStack) {
|
|
101
101
|
const newError = new SeleniumError(err.seleniumStack);
|
|
102
|
-
const isFreeCompany =
|
|
102
|
+
const isFreeCompany = browserOptions?.company?.activePlan?.plan === 'free';
|
|
103
103
|
if (newError.message.includes('timed out waiting for a node') && isFreeCompany) {
|
|
104
104
|
throw new Error('Our free grids are in full capacity, please try again or upgrade to our Professional plan');
|
|
105
105
|
}
|
|
@@ -409,18 +409,6 @@ class WebDriver extends WebDriverApi {
|
|
|
409
409
|
.then(result => result.value);
|
|
410
410
|
}
|
|
411
411
|
|
|
412
|
-
isUsingUnsupportedCompabilityMode(userAgent) {
|
|
413
|
-
return /MSIE ((10.0)|(9.0)|(8.0)|(7.0))/.test(userAgent);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
isIePageNotAvailableUrl(url) {
|
|
417
|
-
return url && url.startsWith('res://ieframe.dll/dnserror');
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
getIeError(msg = '') {
|
|
421
|
-
return Object.assign(new IeError(msg), { success: false, reason: msg, errorType: 'compatibility-mode-error' });
|
|
422
|
-
}
|
|
423
|
-
|
|
424
412
|
getHTML(locateStep) {
|
|
425
413
|
const getHTMLCode = codeSnippets().getHtmlCode(null, locateStep);
|
|
426
414
|
const perfId = this.seleniumPerfStats.markStart(SELENIUM_PERF_MARKS.GET_HTML);
|
|
@@ -429,11 +417,11 @@ class WebDriver extends WebDriverApi {
|
|
|
429
417
|
this.seleniumPerfStats.markEnd(perfId, SELENIUM_PERF_MARKS.GET_HTML);
|
|
430
418
|
return result.value;
|
|
431
419
|
})
|
|
432
|
-
.catch(err =>
|
|
420
|
+
.catch(err => {
|
|
433
421
|
this.seleniumPerfStats.markEnd(perfId, SELENIUM_PERF_MARKS.GET_HTML);
|
|
434
422
|
const testimInternalError = Object.assign(new Error(), { success: false, reason: err.toString(), errorType: 'internal-error' });
|
|
435
423
|
if (!this.client.requestHandler.sessionID) {
|
|
436
|
-
// we got here after the driver has been disposed of. It's impossible to run
|
|
424
|
+
// we got here after the driver has been disposed of. It's impossible to run JavaScript on the page.
|
|
437
425
|
testimInternalError.extraInfo = 'Inside getHtml catch and trying to check if in quirks mode - but the session has already terminated';
|
|
438
426
|
throw testimInternalError;
|
|
439
427
|
}
|
|
@@ -487,7 +475,7 @@ class WebDriver extends WebDriverApi {
|
|
|
487
475
|
* if viewport size not equals desired size, execute process again
|
|
488
476
|
*/
|
|
489
477
|
if (tryNo < MAX_TRIES && (res.value.screenWidth !== size.width || res.value.screenHeight !== size.height)) {
|
|
490
|
-
return _setViewportSize
|
|
478
|
+
return _setViewportSize(size, tryNo + 1);
|
|
491
479
|
}
|
|
492
480
|
});
|
|
493
481
|
});
|
|
@@ -505,15 +493,15 @@ class WebDriver extends WebDriverApi {
|
|
|
505
493
|
|
|
506
494
|
const shouldIndent = (typeof type === 'undefined') ? true : type;
|
|
507
495
|
|
|
508
|
-
return shouldIndent ? _setViewportSize
|
|
496
|
+
return shouldIndent ? _setViewportSize(size) : this.windowHandleSize(size);
|
|
509
497
|
}
|
|
510
498
|
|
|
511
499
|
setViewportSize(width, height) {
|
|
512
500
|
var type = true; //set to false to change window size, true (default) to change viewport size
|
|
513
|
-
return
|
|
501
|
+
return this.setViewportSizeNEW({
|
|
514
502
|
width: width,
|
|
515
503
|
height: height
|
|
516
|
-
}, type)
|
|
504
|
+
}, type);
|
|
517
505
|
}
|
|
518
506
|
|
|
519
507
|
getBrowserMajorVersion(parse) {
|
|
@@ -909,7 +897,7 @@ class WebDriver extends WebDriverApi {
|
|
|
909
897
|
return this.doubleClickFallback(element, eventData, offsets);
|
|
910
898
|
}
|
|
911
899
|
return this.moveTo(extractElementId(element))
|
|
912
|
-
.then(() =>
|
|
900
|
+
.then(() => this.doDoubleClick())
|
|
913
901
|
.catch(err => {
|
|
914
902
|
if (isOldProtocol(err)) {
|
|
915
903
|
this.unsupportedActions.move = true;
|
|
@@ -928,21 +916,21 @@ class WebDriver extends WebDriverApi {
|
|
|
928
916
|
return this.moveWithActionsAPI({ x: startLeft, y: startTop })
|
|
929
917
|
.then(() => {
|
|
930
918
|
const actions = this.getClickActionList(['pointerDown'], LEFT);
|
|
931
|
-
return
|
|
919
|
+
return this.actions(actions);
|
|
932
920
|
})
|
|
933
921
|
.then(() => this.moveWithActionsAPI({ x: endLeft, y: endTop }))
|
|
934
922
|
.then(() => {
|
|
935
923
|
const actions = this.getClickActionList(['pointerUp'], LEFT);
|
|
936
|
-
return
|
|
924
|
+
return this.actions(actions);
|
|
937
925
|
});
|
|
938
926
|
}
|
|
939
927
|
|
|
940
928
|
getTabIds() {
|
|
941
|
-
return this.windowHandles().
|
|
929
|
+
return this.windowHandles().then(r => r.value);
|
|
942
930
|
}
|
|
943
931
|
|
|
944
932
|
isVisible(el) {
|
|
945
|
-
return this.elementIdDisplayed(extractElementId(el)).
|
|
933
|
+
return this.elementIdDisplayed(extractElementId(el)).then(r => r.value);
|
|
946
934
|
}
|
|
947
935
|
|
|
948
936
|
getSource() {
|
package/runOptions.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ interface RunnerOptions extends Partial<Omit<TunnelOptions, 'tunnelOnlyMode' | '
|
|
|
87
87
|
branch: string;
|
|
88
88
|
autoDetect: boolean;
|
|
89
89
|
userParamsData: object;
|
|
90
|
-
mode: 'selenium' | 'extension';
|
|
90
|
+
mode: 'selenium' | 'extension' | 'appium';
|
|
91
91
|
isRegressionBaselineRun?: boolean;
|
|
92
92
|
canary?: boolean;
|
|
93
93
|
rerunFailedByRunId?: string;
|
|
@@ -42,13 +42,13 @@ class LabFeaturesService {
|
|
|
42
42
|
|
|
43
43
|
const { featuresForProject: features, labBatman } = this;
|
|
44
44
|
const labFeature = features.find(f => f.featureFlagName === featureFlagName);
|
|
45
|
-
const featureEnabled = labFeature
|
|
45
|
+
const featureEnabled = labFeature?.enabled;
|
|
46
46
|
|
|
47
47
|
return Boolean(labBatman && featureEnabled);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
isLabsEnabledForCompany(companyPlan) {
|
|
51
|
-
return Boolean(
|
|
51
|
+
return Boolean(companyPlan?.premiumFeatures?.enableLabFeatures);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
validateAsLabFeatureFlag(featureFlag) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const service = require('../agent/routers/cliJsCode/service');
|
|
4
|
-
const { TimeoutError } = require('
|
|
4
|
+
const { TimeoutError } = require('../errors');
|
|
5
5
|
const featureFlags = require('../commons/featureFlags');
|
|
6
6
|
|
|
7
7
|
function isExceedingMaxResultSize(data, project) {
|
package/utils/promiseUtils.js
CHANGED
|
@@ -2,26 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
const Bluebird = require('bluebird');
|
|
6
5
|
const { TimeoutError } = require('../errors');
|
|
6
|
+
const { OVERRIDE_TIMEOUTS } = require('../commons/config');
|
|
7
7
|
|
|
8
8
|
function isPromise(obj) {
|
|
9
9
|
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function' && typeof obj.catch === 'function';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated This is horrifying. Please stop what you are doing and think about what you just considered!
|
|
14
|
-
* @template T
|
|
15
|
-
* @param {() => Promise<T>} fn
|
|
16
|
-
* @returns {Bluebird<T>}
|
|
17
|
-
*/
|
|
18
|
-
function blueBirdify(fn) {
|
|
19
|
-
return new Bluebird((resolve, reject) =>
|
|
20
|
-
fn()
|
|
21
|
-
.then(x => resolve(x))
|
|
22
|
-
.catch(y => reject(y)));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
12
|
/**
|
|
26
13
|
* @param time {number} in ms
|
|
27
14
|
* @returns {Promise}
|
|
@@ -32,6 +19,8 @@ function delay(time) {
|
|
|
32
19
|
}));
|
|
33
20
|
}
|
|
34
21
|
|
|
22
|
+
|
|
23
|
+
let warnedAboutDebugger = false;
|
|
35
24
|
/**
|
|
36
25
|
* @template T
|
|
37
26
|
* @param {Promise<T> | undefined} promise
|
|
@@ -39,7 +28,13 @@ function delay(time) {
|
|
|
39
28
|
* @param {string=} errMsg
|
|
40
29
|
*/
|
|
41
30
|
function promiseTimeout(promise, timeout, errMsg = 'Timeout Error') {
|
|
31
|
+
if (OVERRIDE_TIMEOUTS && !warnedAboutDebugger) {
|
|
32
|
+
warnedAboutDebugger = true;
|
|
33
|
+
// eslint-disable-next-line no-console
|
|
34
|
+
console.log('Debugger connected - timeouts were overridden to 10 minutes to improve debugging');
|
|
35
|
+
}
|
|
42
36
|
const timeoutErr = new TimeoutError(errMsg);
|
|
37
|
+
timeout = OVERRIDE_TIMEOUTS ? Number(OVERRIDE_TIMEOUTS) || 600_000 : timeout;
|
|
43
38
|
return Promise.race([
|
|
44
39
|
promise,
|
|
45
40
|
delay(timeout).then(() => { throw timeoutErr; }),
|
|
@@ -82,7 +77,6 @@ function promiseFromCallback(resolver) {
|
|
|
82
77
|
|
|
83
78
|
module.exports = {
|
|
84
79
|
isPromise,
|
|
85
|
-
blueBirdify,
|
|
86
80
|
delay,
|
|
87
81
|
promiseTimeout,
|
|
88
82
|
promiseMap,
|
package/workers/WorkerAppium.js
CHANGED
|
@@ -142,8 +142,8 @@ class WorkerAppium extends BaseWorker {
|
|
|
142
142
|
testRunHandler.remoteRunId,
|
|
143
143
|
undefined,
|
|
144
144
|
undefined,
|
|
145
|
-
undefined
|
|
146
|
-
)
|
|
145
|
+
undefined,
|
|
146
|
+
).catch(reject),
|
|
147
147
|
);
|
|
148
148
|
if (sessionPlayerInit.localAssetService) {
|
|
149
149
|
await sessionPlayerInit.localAssetService.drain();
|
package/bluebirdConfig.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Configure bluebird promises
|
|
5
|
-
*/
|
|
6
|
-
const Promise = require('bluebird');
|
|
7
|
-
const { isDebuggerConnected } = require('./commons/detectDebugger');
|
|
8
|
-
const { OVERRIDE_TIMEOUTS } = require('./commons/config');
|
|
9
|
-
|
|
10
|
-
Promise.config({
|
|
11
|
-
// Disable warnings.
|
|
12
|
-
warnings: false,
|
|
13
|
-
// Enable long stack traces.
|
|
14
|
-
longStackTraces: Boolean(isDebuggerConnected()),
|
|
15
|
-
// Disable cancellation.
|
|
16
|
-
cancellation: false,
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
let warnedAboutDebugger = false;
|
|
20
|
-
if (OVERRIDE_TIMEOUTS) {
|
|
21
|
-
const old = Promise.prototype.timeout;
|
|
22
|
-
const timeoutOverride = Number(OVERRIDE_TIMEOUTS || 6e5);
|
|
23
|
-
if (!OVERRIDE_TIMEOUTS && !warnedAboutDebugger) {
|
|
24
|
-
warnedAboutDebugger = true;
|
|
25
|
-
console.log('Debugger connected - timeouts were overridden to 10 minutes to improve debugging');
|
|
26
|
-
}
|
|
27
|
-
Promise.prototype.timeout = function onPromiseTimeout() {
|
|
28
|
-
return old.call(this, timeoutOverride);
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (process.env.IS_BLUEBIRD_NATIVE_PROMISE_SCHEDULER) {
|
|
33
|
-
// If the debugger is connected we skip the trampoline in order to schedule with native promise scheduling
|
|
34
|
-
// which makes the V8 debugger aware of promise scheduling and makes async stack traces work without a lot of unnecessary bluebird-specific frames.
|
|
35
|
-
const NativePromise = (async function () {}()).constructor;
|
|
36
|
-
const ResolvedNativePromise = NativePromise.resolve();
|
|
37
|
-
Promise.setScheduler(fn => ResolvedNativePromise.then(fn));
|
|
38
|
-
}
|