suitest-js-api 3.11.1 → 3.11.2
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/index.d.ts +1 -0
- package/lib/commands/pairDevice.js +11 -1
- package/lib/commands/startRecording.js +5 -1
- package/lib/texts.js +2 -1
- package/lib/utils/sessionStarter.js +1 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -7,8 +7,14 @@
|
|
|
7
7
|
const wsContentTypes = require('../api/wsContentTypes');
|
|
8
8
|
const {validate, validators} = require('../validation');
|
|
9
9
|
const chainPromise = require('../utils/chainPromise');
|
|
10
|
-
const {
|
|
10
|
+
const {
|
|
11
|
+
invalidInputMessage,
|
|
12
|
+
connectedToDevice,
|
|
13
|
+
connectingToDevice,
|
|
14
|
+
launcherWrongDeviceId,
|
|
15
|
+
} = require('../texts');
|
|
11
16
|
const {getDevicesDetails} = require('../utils/getDeviceInfo');
|
|
17
|
+
const {recordingUrlInfo} = require('../texts');
|
|
12
18
|
const SuitestError = require('../utils/SuitestError');
|
|
13
19
|
|
|
14
20
|
/**
|
|
@@ -60,6 +66,10 @@ async function pairDevice(
|
|
|
60
66
|
|
|
61
67
|
logger.log(connectedToDevice(deviceName, deviceId));
|
|
62
68
|
|
|
69
|
+
if (recordingOption === 'autostart' && res.recordingUrl) {
|
|
70
|
+
logger.log(recordingUrlInfo(res.recordingUrl));
|
|
71
|
+
}
|
|
72
|
+
|
|
63
73
|
return res;
|
|
64
74
|
}
|
|
65
75
|
|
|
@@ -26,8 +26,12 @@ async function startRecording({webSockets, authContext, logger}, recordingSettin
|
|
|
26
26
|
const response = await webSockets.send(authedContent);
|
|
27
27
|
|
|
28
28
|
if (response.result === 'success') {
|
|
29
|
-
logger.log(startRecordingMessage());
|
|
29
|
+
logger.log(startRecordingMessage(response.recordingUrl));
|
|
30
|
+
|
|
31
|
+
return response.recordingUrl;
|
|
30
32
|
}
|
|
33
|
+
|
|
34
|
+
return undefined;
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
module.exports = chainPromise(startRecording);
|
package/lib/texts.js
CHANGED
|
@@ -214,6 +214,7 @@ ${leaves}`,
|
|
|
214
214
|
cliTimestamp: () => `Logger timestamp format. Use "${timestamp.none}" to disable. [default: "${timestamp.default}"]. This string is processed with momentJS.`,
|
|
215
215
|
cliConfig: () => 'Config file to override default config.',
|
|
216
216
|
cliRecordingOption: () => 'Enables recording of test session',
|
|
217
|
-
startRecordingMessage: () =>
|
|
217
|
+
startRecordingMessage: (recordingUrl) => `Recording started. Recording URL: ${recordingUrl}`,
|
|
218
|
+
recordingUrlInfo: (recordingUrl) => `Recording URL: ${recordingUrl}`,
|
|
218
219
|
stopRecordingMessage: () => 'Recording stopped',
|
|
219
220
|
};
|