suitest-js-api 3.2.2 → 3.3.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/index.d.ts CHANGED
@@ -271,6 +271,8 @@ declare namespace suitest {
271
271
  suitestify: boolean;
272
272
  domainList: string[];
273
273
  variables: Record<string, string>;
274
+ platform: string;
275
+ isHtmlBased: boolean;
274
276
  }
275
277
 
276
278
  interface ConfigureOptions {
@@ -219,10 +219,17 @@ const applyNegation = (comparator, data) => {
219
219
  */
220
220
  const applyUntilCondition = (socketMessage, data) => {
221
221
  if (data.until) {
222
- return {
222
+ const newSocketMessage = {
223
223
  ...socketMessage,
224
224
  condition: data.until,
225
225
  };
226
+
227
+ // need negateCondition is mandatory for snippet command
228
+ if (data.type === 'runSnippet') {
229
+ newSocketMessage.negateCondition = false;
230
+ }
231
+
232
+ return newSocketMessage;
226
233
  }
227
234
 
228
235
  return socketMessage;
@@ -19,46 +19,50 @@ const SCREEN_ORIENTATION = require('../constants/screenOrientation');
19
19
  const LAUNCH_MODE = require('../constants/launchMode');
20
20
  const schemas = {};
21
21
 
22
- schemas[validationKeys.CONFIG_OVERRIDE] = {
23
- 'type': 'object',
24
- 'properties': {
25
- 'url': {'type': 'string'},
26
- 'suitestify': {'type': 'boolean'},
27
- 'domainList': {
28
- 'type': 'array',
29
- 'items': {'type': 'string'},
30
- },
31
- 'mapRules': {
32
- 'type': 'array',
33
- 'items': {
34
- 'type': 'object',
35
- 'properties': {
36
- 'methods': {
37
- 'type': 'array',
38
- 'items': {'type': 'string'},
39
- },
40
- 'url': {'type': 'string'},
41
- 'type': {'type': 'string'},
42
- 'toUrl': {'type': 'string'},
22
+ const CONFIG_OVERRIDE_PROPERTIES = {
23
+ 'url': {'type': 'string'},
24
+ 'suitestify': {'type': 'boolean'},
25
+ 'domainList': {
26
+ 'type': 'array',
27
+ 'items': {'type': 'string'},
28
+ },
29
+ 'mapRules': {
30
+ 'type': 'array',
31
+ 'items': {
32
+ 'type': 'object',
33
+ 'properties': {
34
+ 'methods': {
35
+ 'type': 'array',
36
+ 'items': {'type': 'string'},
43
37
  },
38
+ 'url': {'type': 'string'},
39
+ 'type': {'type': 'string'},
40
+ 'toUrl': {'type': 'string'},
44
41
  },
45
42
  },
46
- 'codeOverrides': {'type': 'object'},
47
- 'configVariables': {
48
- 'type': 'array',
49
- 'items': {
50
- 'type': 'object',
51
- 'properties': {
52
- 'key': {'type': 'string'},
53
- 'value': {'type': 'string'},
54
- },
55
- 'required': ['key', 'value'],
43
+ },
44
+ 'codeOverrides': {'type': 'object'},
45
+ 'configVariables': {
46
+ 'type': 'array',
47
+ 'items': {
48
+ 'type': 'object',
49
+ 'properties': {
50
+ 'key': {'type': 'string'},
51
+ 'value': {'type': 'string'},
56
52
  },
53
+ 'required': ['key', 'value'],
57
54
  },
58
- 'openAppOverrideTest': {
59
- 'type': 'string',
60
- 'format': 'uuid',
61
- },
55
+ },
56
+ 'openAppOverrideTest': {
57
+ 'type': 'string',
58
+ 'format': 'uuid',
59
+ },
60
+ };
61
+
62
+ schemas[validationKeys.CONFIG_OVERRIDE] = {
63
+ 'type': 'object',
64
+ 'properties': {
65
+ ...CONFIG_OVERRIDE_PROPERTIES,
62
66
  },
63
67
  };
64
68
 
@@ -328,8 +332,8 @@ schemas[validationKeys.TEST_LAUNCHER_TOKEN] = {
328
332
  'type': 'object',
329
333
  'properties': {
330
334
  'configId': {'type': 'string'},
335
+ ...CONFIG_OVERRIDE_PROPERTIES,
331
336
  },
332
- 'additionalProperties': false,
333
337
  },
334
338
  ],
335
339
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suitest-js-api",
3
- "version": "3.2.2",
3
+ "version": "3.3.0",
4
4
  "main": "index.js",
5
5
  "repository": "git@github.com:SuitestAutomation/suitest-js-api.git",
6
6
  "author": "Suitest <hello@suite.st>",