@testim/testim-cli 3.267.0 → 3.269.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/service.js +53 -20
- package/bluebirdConfig.js +5 -4
- package/commons/httpRequest.js +8 -8
- package/commons/runnerFileCache.js +19 -6
- package/commons/socket/baseSocketServiceSocketIO.js +25 -2
- package/commons/socket/testResultService.js +0 -1
- package/commons/testimDesiredCapabilitiesBuilder.js +22 -8
- package/commons/testimServicesApi.js +31 -5
- package/credentialsManager.js +4 -3
- package/npm-shrinkwrap.json +38 -38
- package/package.json +1 -1
- package/player/extensionTestPlayer.js +8 -6
- package/player/seleniumTestPlayer.js +16 -11
- package/player/services/tabService.js +70 -75
- package/player/stepActions/baseCliJsStepAction.js +3 -3
- package/player/stepActions/nodePackageStepAction.js +2 -2
- package/player/utils/windowUtils.js +19 -12
- package/reports/consoleReporter.js +6 -2
- package/runOptions.d.ts +4 -3
- package/runOptions.js +3 -2
- package/runner.js +1 -1
- package/stepPlayers/nodePackageStepPlayback.js +18 -14
- package/testRunHandler.js +232 -234
- package/testimNpmDriver.js +17 -18
- package/utils/promiseUtils.js +1 -0
- package/workers/BaseWorker.js +22 -22
- package/workers/BaseWorker.test.js +1 -6
- package/workers/WorkerAppium.js +74 -19
- package/workers/WorkerExtension.js +11 -5
- package/workers/WorkerExtensionSingleBrowser.js +7 -2
- package/workers/WorkerSelenium.js +23 -23
package/runOptions.js
CHANGED
|
@@ -220,6 +220,7 @@ program
|
|
|
220
220
|
.option('--device-model [device-model]', 'The device model to use, iPhone 12, Nexus 5X, SM-G900P etc....')
|
|
221
221
|
.option('--device-udid [device-udid]', 'the device unique id')
|
|
222
222
|
.option('--os-version [os-version]', 'The operating system version number')
|
|
223
|
+
.option('--app-id [app-id]', 'The application id from app library on Testim Editor App')
|
|
223
224
|
|
|
224
225
|
.option('-str --suppress-tms-reporting [suppress-tms-reporting]', 'disable test management reporting', false)
|
|
225
226
|
.option('-tsr --tms-suppress-reporting [tms-suppress-reporting]', 'disable test management reporting', false)
|
|
@@ -1037,7 +1038,6 @@ module.exports = {
|
|
|
1037
1038
|
if (program.deviceUdid && (program.deviceModel || program.osVersion)) {
|
|
1038
1039
|
throw new ArgError('It is not possible to use --osVersion or --deviceModel with --device-udid. device-udid is unique and cannot be combined with another flag');
|
|
1039
1040
|
}
|
|
1040
|
-
|
|
1041
1041
|
if (program.lightweightMode) {
|
|
1042
1042
|
try {
|
|
1043
1043
|
const DEFAULTS = {
|
|
@@ -1154,10 +1154,11 @@ module.exports = {
|
|
|
1154
1154
|
retentionDays: program.setRetention,
|
|
1155
1155
|
passZeroTests: Boolean(program.passZeroTests),
|
|
1156
1156
|
runQuarantinedTests: Boolean(program.runQuarantinedTests),
|
|
1157
|
-
|
|
1157
|
+
//Mobile-Flags
|
|
1158
1158
|
deviceModel: program.deviceModel,
|
|
1159
1159
|
deviceUdid: program.deviceUdid,
|
|
1160
1160
|
osVersion: program.osVersion,
|
|
1161
|
+
appId: program.appId,
|
|
1161
1162
|
|
|
1162
1163
|
// Extension
|
|
1163
1164
|
ext: program.ext,
|
package/runner.js
CHANGED
|
@@ -254,7 +254,7 @@ async function runRunner(options, customExtensionLocalLocation) {
|
|
|
254
254
|
options.source = (useLocalChromeDriver || useChromeLauncher) ? 'cli-local' : 'cli';
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
npmDriver.checkNpmVersion();
|
|
257
|
+
await npmDriver.checkNpmVersion();
|
|
258
258
|
perf.log('in runner.js after checkNpmVersion');
|
|
259
259
|
|
|
260
260
|
await validateCliAccount(options);
|
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
|
|
3
3
|
const service = require('../agent/routers/cliJsCode/service');
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const { NpmPackageError } = require('../errors');
|
|
5
|
+
const utils = require('../utils');
|
|
6
6
|
|
|
7
|
-
module.exports.run = (browser, step) => {
|
|
8
|
-
const {stepId, testResultId, retryIndex, stepResultId, packageData, timeout} = step.data;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
module.exports.run = async (browser, step) => {
|
|
8
|
+
const { stepId, testResultId, retryIndex, stepResultId, packageData, timeout } = step.data;
|
|
9
|
+
try {
|
|
10
|
+
const data = await service.installPackage(stepId, testResultId, retryIndex, packageData, stepResultId, timeout);
|
|
11
|
+
return { data, success: true };
|
|
12
|
+
} catch (err) {
|
|
13
|
+
if (err instanceof NpmPackageError) {
|
|
12
14
|
return {
|
|
13
15
|
success: false,
|
|
14
|
-
code:
|
|
15
|
-
message: err.message
|
|
16
|
+
code: 'invalid-node-package',
|
|
17
|
+
message: err.message,
|
|
16
18
|
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
+
}
|
|
20
|
+
if (err instanceof utils.TimeoutError) {
|
|
19
21
|
return {
|
|
20
22
|
success: false,
|
|
21
|
-
code:
|
|
23
|
+
code: 'timeout',
|
|
22
24
|
};
|
|
23
|
-
}
|
|
25
|
+
}
|
|
26
|
+
throw err;
|
|
27
|
+
}
|
|
24
28
|
};
|