testit-js-commons 5.0.5 → 5.0.6-TMS-5.8

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.
Files changed (43) hide show
  1. package/lib/adapters-api/dist/ApiClient.js +5 -6
  2. package/lib/adapters-api/dist/api/AttachmentsApi.js +5 -5
  3. package/lib/adapters-api/dist/api/AutoTestsApi.js +11 -11
  4. package/lib/adapters-api/dist/api/ConfigurationsApi.js +1 -1
  5. package/lib/adapters-api/dist/api/ParametersApi.js +3 -3
  6. package/lib/adapters-api/dist/api/ProjectAttributesApi.js +6 -6
  7. package/lib/adapters-api/dist/api/ProjectSectionsApi.js +1 -1
  8. package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +1 -1
  9. package/lib/adapters-api/dist/api/ProjectsApi.js +4 -4
  10. package/lib/adapters-api/dist/api/SectionsApi.js +2 -2
  11. package/lib/adapters-api/dist/api/TestResultsApi.js +3 -3
  12. package/lib/adapters-api/dist/api/TestRunsApi.js +8 -8
  13. package/lib/adapters-api/dist/api/WorkItemsApi.js +3 -3
  14. package/lib/adapters-api/dist/api/WorkflowsApi.js +1 -1
  15. package/lib/adapters-api/dist/index.js +3 -3
  16. package/lib/adapters-api/dist/model/AttachmentPutModelAutoTestStepResultsModel.js +1 -1
  17. package/lib/adapters-api/dist/model/AutoTestStepResult.js +1 -1
  18. package/lib/adapters-api/dist/model/AutoTestStepResultUpdateRequest.js +1 -1
  19. package/lib/adapters-api/dist/model/CreateEmptyTestRunApiModel.js +2 -2
  20. package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +2 -2
  21. package/lib/adapters-api/dist/model/{CustomAttributeModel.js → CustomAttributeGetModel.js} +39 -89
  22. package/lib/adapters-api/dist/model/CustomAttributePutModel.js +1 -1
  23. package/lib/adapters-api/dist/model/LabelApiModel.js +15 -4
  24. package/lib/adapters-api/dist/model/TestResultResponse.js +4 -18
  25. package/lib/adapters-api/dist/model/UpdateEmptyTestRunApiModel.js +1 -1
  26. package/lib/adapters-api/index.d.ts +196 -40
  27. package/lib/common/utils/tms-load-test-run-debug.d.ts +0 -2
  28. package/lib/common/utils/tms-load-test-run-debug.js +0 -6
  29. package/lib/services/attachments/attachments.service.d.ts +1 -0
  30. package/lib/services/attachments/attachments.service.js +10 -2
  31. package/lib/services/syncstorage/syncstorage.runner.js +5 -6
  32. package/lib/services/syncstorage/syncstorage.runner.test.js +0 -16
  33. package/lib/services/testresults/testresults.converter.d.ts +5 -4
  34. package/lib/services/testresults/testresults.converter.js +8 -0
  35. package/lib/services/testresults/testresults.service.js +18 -1
  36. package/lib/services/testruns/testruns.handler.d.ts +2 -2
  37. package/lib/services/testruns/testruns.handler.js +2 -12
  38. package/lib/services/testruns/testruns.service.js +6 -21
  39. package/lib/services/testruns/testruns.service.test.js +43 -0
  40. package/lib/strategy/base.strategy.js +1 -0
  41. package/lib/strategy/zero.strategy.js +1 -1
  42. package/lib/sync-storage/dist/ApiClient.js +0 -3
  43. package/package.json +1 -1
@@ -22,28 +22,25 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
22
22
  */
23
23
 
24
24
  /**
25
- * The CustomAttributeModel model module.
26
- * @module model/CustomAttributeModel
25
+ * The CustomAttributeGetModel model module.
26
+ * @module model/CustomAttributeGetModel
27
27
  * @version 1.0.0
28
28
  */
29
- class CustomAttributeModel {
29
+ class CustomAttributeGetModel {
30
30
  /**
31
- * Constructs a new <code>CustomAttributeModel</code>.
32
- * @alias module:model/CustomAttributeModel
33
- * @param id {String} Unique ID of the attribute.
34
- * @param type {module:model/CustomAttributeTypesEnum} Type of the attribute.
35
- * @param options {Array.<module:model/CustomAttributeOptionModel>} Collection of the attribute options.
36
- * @param targets {Array.<String>} Collection of the attribute targets. Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans).
37
- * @param isReadOnly {Boolean} Indicates if the attribute is read-only.
38
- * @param isDeleted {Boolean} Indicates if the attribute is deleted.
39
- * @param isSystem {Boolean} Indicates if the attribute is system.
31
+ * Constructs a new <code>CustomAttributeGetModel</code>.
32
+ * @alias module:model/CustomAttributeGetModel
33
+ * @param id {String} Unique ID of the attribute
34
+ * @param options {Array.<module:model/CustomAttributeOptionModel>} Collection of the attribute options
35
+ * @param type {module:model/CustomAttributeTypesEnum} Type of the attribute
36
+ * @param isDeleted {Boolean} Indicates if the attribute is deleted
40
37
  * @param name {String} Name of the attribute
41
38
  * @param isEnabled {Boolean} Indicates if the attribute is enabled
42
- * @param isRequired {Boolean} Indicates if the attribute value is mandatory to specify
39
+ * @param isRequired {Boolean} Indicates if the attribute is mandatory to specify
43
40
  * @param isGlobal {Boolean} Indicates if the attribute is available across all projects
44
41
  */
45
- constructor(id, type, options, targets, isReadOnly, isDeleted, isSystem, name, isEnabled, isRequired, isGlobal) {
46
- CustomAttributeModel.initialize(this, id, type, options, targets, isReadOnly, isDeleted, isSystem, name, isEnabled, isRequired, isGlobal);
42
+ constructor(id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal) {
43
+ CustomAttributeGetModel.initialize(this, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal);
47
44
  }
48
45
 
49
46
  /**
@@ -51,14 +48,11 @@ class CustomAttributeModel {
51
48
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
52
49
  * Only for internal use.
53
50
  */
54
- static initialize(obj, id, type, options, targets, isReadOnly, isDeleted, isSystem, name, isEnabled, isRequired, isGlobal) {
51
+ static initialize(obj, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal) {
55
52
  obj['id'] = id;
56
- obj['type'] = type;
57
53
  obj['options'] = options;
58
- obj['targets'] = targets;
59
- obj['isReadOnly'] = isReadOnly;
54
+ obj['type'] = type;
60
55
  obj['isDeleted'] = isDeleted;
61
- obj['isSystem'] = isSystem;
62
56
  obj['name'] = name;
63
57
  obj['isEnabled'] = isEnabled;
64
58
  obj['isRequired'] = isRequired;
@@ -66,39 +60,27 @@ class CustomAttributeModel {
66
60
  }
67
61
 
68
62
  /**
69
- * Constructs a <code>CustomAttributeModel</code> from a plain JavaScript object, optionally creating a new instance.
63
+ * Constructs a <code>CustomAttributeGetModel</code> from a plain JavaScript object, optionally creating a new instance.
70
64
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
71
65
  * @param {Object} data The plain JavaScript object bearing properties of interest.
72
- * @param {module:model/CustomAttributeModel} obj Optional instance to populate.
73
- * @return {module:model/CustomAttributeModel} The populated <code>CustomAttributeModel</code> instance.
66
+ * @param {module:model/CustomAttributeGetModel} obj Optional instance to populate.
67
+ * @return {module:model/CustomAttributeGetModel} The populated <code>CustomAttributeGetModel</code> instance.
74
68
  */
75
69
  static constructFromObject(data, obj) {
76
70
  if (data) {
77
- obj = obj || new CustomAttributeModel();
71
+ obj = obj || new CustomAttributeGetModel();
78
72
  if (data.hasOwnProperty('id')) {
79
73
  obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
80
74
  }
81
- if (data.hasOwnProperty('code')) {
82
- obj['code'] = _ApiClient.default.convertToType(data['code'], 'String');
83
- }
84
- if (data.hasOwnProperty('type')) {
85
- obj['type'] = _ApiClient.default.convertToType(data['type'], _CustomAttributeTypesEnum.default);
86
- }
87
75
  if (data.hasOwnProperty('options')) {
88
76
  obj['options'] = _ApiClient.default.convertToType(data['options'], [_CustomAttributeOptionModel.default]);
89
77
  }
90
- if (data.hasOwnProperty('targets')) {
91
- obj['targets'] = _ApiClient.default.convertToType(data['targets'], ['String']);
92
- }
93
- if (data.hasOwnProperty('isReadOnly')) {
94
- obj['isReadOnly'] = _ApiClient.default.convertToType(data['isReadOnly'], 'Boolean');
78
+ if (data.hasOwnProperty('type')) {
79
+ obj['type'] = _ApiClient.default.convertToType(data['type'], _CustomAttributeTypesEnum.default);
95
80
  }
96
81
  if (data.hasOwnProperty('isDeleted')) {
97
82
  obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
98
83
  }
99
- if (data.hasOwnProperty('isSystem')) {
100
- obj['isSystem'] = _ApiClient.default.convertToType(data['isSystem'], 'Boolean');
101
- }
102
84
  if (data.hasOwnProperty('name')) {
103
85
  obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
104
86
  }
@@ -116,13 +98,13 @@ class CustomAttributeModel {
116
98
  }
117
99
 
118
100
  /**
119
- * Validates the JSON data with respect to <code>CustomAttributeModel</code>.
101
+ * Validates the JSON data with respect to <code>CustomAttributeGetModel</code>.
120
102
  * @param {Object} data The plain JavaScript object bearing properties of interest.
121
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomAttributeModel</code>.
103
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomAttributeGetModel</code>.
122
104
  */
123
105
  static validateJSON(data) {
124
106
  // check to make sure all required properties are present in the JSON string
125
- for (const property of CustomAttributeModel.RequiredProperties) {
107
+ for (const property of CustomAttributeGetModel.RequiredProperties) {
126
108
  if (!data.hasOwnProperty(property)) {
127
109
  throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
128
110
  }
@@ -131,10 +113,6 @@ class CustomAttributeModel {
131
113
  if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
132
114
  throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
133
115
  }
134
- // ensure the json data is a string
135
- if (data['code'] && !(typeof data['code'] === 'string' || data['code'] instanceof String)) {
136
- throw new Error("Expected the field `code` to be a primitive type in the JSON string but got " + data['code']);
137
- }
138
116
  if (data['options']) {
139
117
  // data not null
140
118
  // ensure the json data is an array
@@ -147,10 +125,6 @@ class CustomAttributeModel {
147
125
  }
148
126
  ;
149
127
  }
150
- // ensure the json data is an array
151
- if (!Array.isArray(data['targets'])) {
152
- throw new Error("Expected the field `targets` to be an array in the JSON data but got " + data['targets']);
153
- }
154
128
  // ensure the json data is a string
155
129
  if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
156
130
  throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
@@ -158,77 +132,53 @@ class CustomAttributeModel {
158
132
  return true;
159
133
  }
160
134
  }
161
- CustomAttributeModel.RequiredProperties = ["id", "type", "options", "targets", "isReadOnly", "isDeleted", "isSystem", "name", "isEnabled", "isRequired", "isGlobal"];
135
+ CustomAttributeGetModel.RequiredProperties = ["id", "options", "type", "isDeleted", "name", "isEnabled", "isRequired", "isGlobal"];
162
136
 
163
137
  /**
164
- * Unique ID of the attribute.
138
+ * Unique ID of the attribute
165
139
  * @member {String} id
166
140
  */
167
- CustomAttributeModel.prototype['id'] = undefined;
141
+ CustomAttributeGetModel.prototype['id'] = undefined;
168
142
 
169
143
  /**
170
- * Optional code identifier for the attribute.
171
- * @member {String} code
172
- */
173
- CustomAttributeModel.prototype['code'] = undefined;
174
-
175
- /**
176
- * Type of the attribute.
177
- * @member {module:model/CustomAttributeTypesEnum} type
178
- */
179
- CustomAttributeModel.prototype['type'] = undefined;
180
-
181
- /**
182
- * Collection of the attribute options.
144
+ * Collection of the attribute options
183
145
  * @member {Array.<module:model/CustomAttributeOptionModel>} options
184
146
  */
185
- CustomAttributeModel.prototype['options'] = undefined;
147
+ CustomAttributeGetModel.prototype['options'] = undefined;
186
148
 
187
149
  /**
188
- * Collection of the attribute targets. Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans).
189
- * @member {Array.<String>} targets
190
- */
191
- CustomAttributeModel.prototype['targets'] = undefined;
192
-
193
- /**
194
- * Indicates if the attribute is read-only.
195
- * @member {Boolean} isReadOnly
150
+ * Type of the attribute
151
+ * @member {module:model/CustomAttributeTypesEnum} type
196
152
  */
197
- CustomAttributeModel.prototype['isReadOnly'] = undefined;
153
+ CustomAttributeGetModel.prototype['type'] = undefined;
198
154
 
199
155
  /**
200
- * Indicates if the attribute is deleted.
156
+ * Indicates if the attribute is deleted
201
157
  * @member {Boolean} isDeleted
202
158
  */
203
- CustomAttributeModel.prototype['isDeleted'] = undefined;
204
-
205
- /**
206
- * Indicates if the attribute is system.
207
- * @member {Boolean} isSystem
208
- */
209
- CustomAttributeModel.prototype['isSystem'] = undefined;
159
+ CustomAttributeGetModel.prototype['isDeleted'] = undefined;
210
160
 
211
161
  /**
212
162
  * Name of the attribute
213
163
  * @member {String} name
214
164
  */
215
- CustomAttributeModel.prototype['name'] = undefined;
165
+ CustomAttributeGetModel.prototype['name'] = undefined;
216
166
 
217
167
  /**
218
168
  * Indicates if the attribute is enabled
219
169
  * @member {Boolean} isEnabled
220
170
  */
221
- CustomAttributeModel.prototype['isEnabled'] = undefined;
171
+ CustomAttributeGetModel.prototype['isEnabled'] = undefined;
222
172
 
223
173
  /**
224
- * Indicates if the attribute value is mandatory to specify
174
+ * Indicates if the attribute is mandatory to specify
225
175
  * @member {Boolean} isRequired
226
176
  */
227
- CustomAttributeModel.prototype['isRequired'] = undefined;
177
+ CustomAttributeGetModel.prototype['isRequired'] = undefined;
228
178
 
229
179
  /**
230
180
  * Indicates if the attribute is available across all projects
231
181
  * @member {Boolean} isGlobal
232
182
  */
233
- CustomAttributeModel.prototype['isGlobal'] = undefined;
234
- var _default = exports.default = CustomAttributeModel;
183
+ CustomAttributeGetModel.prototype['isGlobal'] = undefined;
184
+ var _default = exports.default = CustomAttributeGetModel;
@@ -139,7 +139,7 @@ CustomAttributePutModel.RequiredProperties = ["id", "type", "isDeleted", "name",
139
139
  CustomAttributePutModel.prototype['id'] = undefined;
140
140
 
141
141
  /**
142
- * Collection of the attribute options Available for attributes of type `options` and `multiple options` only
142
+ * Collection of the attribute options Available for attributes of type `options` and `multiple options` only
143
143
  * @member {Array.<module:model/CustomAttributeOptionModel>} options
144
144
  */
145
145
  CustomAttributePutModel.prototype['options'] = undefined;
@@ -29,9 +29,10 @@ class LabelApiModel {
29
29
  * Constructs a new <code>LabelApiModel</code>.
30
30
  * @alias module:model/LabelApiModel
31
31
  * @param name {String} Name of the label
32
+ * @param globalId {Number} Global ID of the label
32
33
  */
33
- constructor(name) {
34
- LabelApiModel.initialize(this, name);
34
+ constructor(name, globalId) {
35
+ LabelApiModel.initialize(this, name, globalId);
35
36
  }
36
37
 
37
38
  /**
@@ -39,8 +40,9 @@ class LabelApiModel {
39
40
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
40
41
  * Only for internal use.
41
42
  */
42
- static initialize(obj, name) {
43
+ static initialize(obj, name, globalId) {
43
44
  obj['name'] = name;
45
+ obj['globalId'] = globalId;
44
46
  }
45
47
 
46
48
  /**
@@ -56,6 +58,9 @@ class LabelApiModel {
56
58
  if (data.hasOwnProperty('name')) {
57
59
  obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
58
60
  }
61
+ if (data.hasOwnProperty('globalId')) {
62
+ obj['globalId'] = _ApiClient.default.convertToType(data['globalId'], 'Number');
63
+ }
59
64
  }
60
65
  return obj;
61
66
  }
@@ -79,11 +84,17 @@ class LabelApiModel {
79
84
  return true;
80
85
  }
81
86
  }
82
- LabelApiModel.RequiredProperties = ["name"];
87
+ LabelApiModel.RequiredProperties = ["name", "globalId"];
83
88
 
84
89
  /**
85
90
  * Name of the label
86
91
  * @member {String} name
87
92
  */
88
93
  LabelApiModel.prototype['name'] = undefined;
94
+
95
+ /**
96
+ * Global ID of the label
97
+ * @member {Number} globalId
98
+ */
99
+ LabelApiModel.prototype['globalId'] = undefined;
89
100
  var _default = exports.default = LabelApiModel;
@@ -39,11 +39,10 @@ class TestResultResponse {
39
39
  * @param id {String}
40
40
  * @param failureClassIds {Array.<String>}
41
41
  * @param configurationId {String}
42
- * @param testPointId {String}
43
42
  * @param testRunId {String}
44
43
  */
45
- constructor(id, failureClassIds, configurationId, testPointId, testRunId) {
46
- TestResultResponse.initialize(this, id, failureClassIds, configurationId, testPointId, testRunId);
44
+ constructor(id, failureClassIds, configurationId, testRunId) {
45
+ TestResultResponse.initialize(this, id, failureClassIds, configurationId, testRunId);
47
46
  }
48
47
 
49
48
  /**
@@ -51,11 +50,10 @@ class TestResultResponse {
51
50
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
52
51
  * Only for internal use.
53
52
  */
54
- static initialize(obj, id, failureClassIds, configurationId, testPointId, testRunId) {
53
+ static initialize(obj, id, failureClassIds, configurationId, testRunId) {
55
54
  obj['id'] = id;
56
55
  obj['failureClassIds'] = failureClassIds;
57
56
  obj['configurationId'] = configurationId;
58
- obj['testPointId'] = testPointId;
59
57
  obj['testRunId'] = testRunId;
60
58
  }
61
59
 
@@ -102,9 +100,6 @@ class TestResultResponse {
102
100
  if (data.hasOwnProperty('configurationId')) {
103
101
  obj['configurationId'] = _ApiClient.default.convertToType(data['configurationId'], 'String');
104
102
  }
105
- if (data.hasOwnProperty('testPointId')) {
106
- obj['testPointId'] = _ApiClient.default.convertToType(data['testPointId'], 'String');
107
- }
108
103
  if (data.hasOwnProperty('durationInMs')) {
109
104
  obj['durationInMs'] = _ApiClient.default.convertToType(data['durationInMs'], 'Number');
110
105
  }
@@ -232,10 +227,6 @@ class TestResultResponse {
232
227
  throw new Error("Expected the field `configurationId` to be a primitive type in the JSON string but got " + data['configurationId']);
233
228
  }
234
229
  // ensure the json data is a string
235
- if (data['testPointId'] && !(typeof data['testPointId'] === 'string' || data['testPointId'] instanceof String)) {
236
- throw new Error("Expected the field `testPointId` to be a primitive type in the JSON string but got " + data['testPointId']);
237
- }
238
- // ensure the json data is a string
239
230
  if (data['traces'] && !(typeof data['traces'] === 'string' || data['traces'] instanceof String)) {
240
231
  throw new Error("Expected the field `traces` to be a primitive type in the JSON string but got " + data['traces']);
241
232
  }
@@ -295,7 +286,7 @@ class TestResultResponse {
295
286
  return true;
296
287
  }
297
288
  }
298
- TestResultResponse.RequiredProperties = ["id", "failureClassIds", "configurationId", "testPointId", "testRunId"];
289
+ TestResultResponse.RequiredProperties = ["id", "failureClassIds", "configurationId", "testRunId"];
299
290
 
300
291
  /**
301
292
  * @member {String} id
@@ -352,11 +343,6 @@ TestResultResponse.prototype['autoTestId'] = undefined;
352
343
  */
353
344
  TestResultResponse.prototype['configurationId'] = undefined;
354
345
 
355
- /**
356
- * @member {String} testPointId
357
- */
358
- TestResultResponse.prototype['testPointId'] = undefined;
359
-
360
346
  /**
361
347
  * @member {Number} durationInMs
362
348
  */
@@ -162,7 +162,7 @@ UpdateEmptyTestRunApiModel.prototype['name'] = undefined;
162
162
  UpdateEmptyTestRunApiModel.prototype['description'] = undefined;
163
163
 
164
164
  /**
165
- * Test run launch source Once launch source is specified it cannot be updated
165
+ * Test run launch source Once launch source is specified it cannot be updated
166
166
  * @member {String} launchSource
167
167
  */
168
168
  UpdateEmptyTestRunApiModel.prototype['launchSource'] = undefined;