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 CHANGED
@@ -240,6 +240,7 @@ declare namespace suitest {
240
240
  id: string;
241
241
  firmware: string;
242
242
  modelId: string;
243
+ recordingUrl: string;
243
244
  }
244
245
 
245
246
  interface ConfigOverride {
@@ -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 {invalidInputMessage, connectedToDevice, connectingToDevice, launcherWrongDeviceId} = require('../texts');
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: () => 'Recording started',
217
+ startRecordingMessage: (recordingUrl) => `Recording started. Recording URL: ${recordingUrl}`,
218
+ recordingUrlInfo: (recordingUrl) => `Recording URL: ${recordingUrl}`,
218
219
  stopRecordingMessage: () => 'Recording stopped',
219
220
  };
@@ -56,6 +56,7 @@ const bootstrapSession = async(suitest, {deviceId, configId, presetName}) => {
56
56
  : {};
57
57
 
58
58
  await setAppConfig(suitest, configId, configOverride);
59
+
59
60
  await pairDevice(
60
61
  suitest,
61
62
  deviceId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suitest-js-api",
3
- "version": "3.11.1",
3
+ "version": "3.11.2",
4
4
  "main": "index.js",
5
5
  "repository": "git@github.com:SuitestAutomation/suitest-js-api.git",
6
6
  "author": "Suitest <hello@suite.st>",