testit-js-commons 4.2.0-TMS-5.8 → 5.0.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/lib/adapters-api/dist/ApiClient.js +683 -0
- package/lib/adapters-api/dist/api/AttachmentsApi.js +165 -0
- package/lib/adapters-api/dist/api/AutoTestsApi.js +536 -0
- package/lib/adapters-api/dist/api/ConfigurationsApi.js +91 -0
- package/lib/adapters-api/dist/api/ParametersApi.js +159 -0
- package/lib/adapters-api/dist/api/ProjectAttributesApi.js +140 -0
- package/lib/adapters-api/dist/api/ProjectSectionsApi.js +96 -0
- package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +99 -0
- package/lib/adapters-api/dist/api/ProjectsApi.js +200 -0
- package/lib/adapters-api/dist/api/SectionsApi.js +118 -0
- package/lib/adapters-api/dist/api/TestResultsApi.js +168 -0
- package/lib/adapters-api/dist/api/TestRunsApi.js +331 -0
- package/lib/adapters-api/dist/api/WorkItemsApi.js +170 -0
- package/lib/adapters-api/dist/api/WorkflowsApi.js +75 -0
- package/lib/adapters-api/dist/index.js +951 -0
- package/lib/adapters-api/dist/model/AssignAttachmentApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AssignAutoTestCaseIdApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AssignIterationApiModel.js +112 -0
- package/lib/adapters-api/dist/model/AttachmentApiResult.js +145 -0
- package/lib/adapters-api/dist/model/AttachmentModel.js +193 -0
- package/lib/adapters-api/dist/model/AttachmentPutModel.js +89 -0
- package/lib/adapters-api/dist/model/AttachmentPutModelAutoTestStepResultsModel.js +196 -0
- package/lib/adapters-api/dist/model/AttachmentUpdateRequest.js +89 -0
- package/lib/adapters-api/dist/model/AutoTest.js +327 -0
- package/lib/adapters-api/dist/model/AutoTestApiResult.js +323 -0
- package/lib/adapters-api/dist/model/AutoTestCaseApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AutoTestCreateApiModel.js +323 -0
- package/lib/adapters-api/dist/model/AutoTestFilterApiModel.js +201 -0
- package/lib/adapters-api/dist/model/AutoTestIdModel.js +88 -0
- package/lib/adapters-api/dist/model/AutoTestModel.js +488 -0
- package/lib/adapters-api/dist/model/AutoTestResultReasonShort.js +99 -0
- package/lib/adapters-api/dist/model/AutoTestResultsForTestRunModel.js +334 -0
- package/lib/adapters-api/dist/model/AutoTestSearchApiModel.js +96 -0
- package/lib/adapters-api/dist/model/AutoTestSearchIncludeApiModel.js +93 -0
- package/lib/adapters-api/dist/model/AutoTestStep.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepApiModel.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepApiResult.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepModel.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepResult.js +196 -0
- package/lib/adapters-api/dist/model/AutoTestStepResultUpdateRequest.js +196 -0
- package/lib/adapters-api/dist/model/AutoTestUpdateApiModel.js +327 -0
- package/lib/adapters-api/dist/model/AutoTestWorkItemIdentifierApiResult.js +100 -0
- package/lib/adapters-api/dist/model/AvailableTestResultOutcome.js +67 -0
- package/lib/adapters-api/dist/model/ConfigurationFilterModel.js +114 -0
- package/lib/adapters-api/dist/model/ConfigurationModel.js +213 -0
- package/lib/adapters-api/dist/model/ConfigurationShortModel.js +102 -0
- package/lib/adapters-api/dist/model/CreateEmptyTestRunApiModel.js +185 -0
- package/lib/adapters-api/dist/model/CreateLinkApiModel.js +127 -0
- package/lib/adapters-api/dist/model/CreateParameterApiModel.js +117 -0
- package/lib/adapters-api/dist/model/CreateProjectApiModel.js +124 -0
- package/lib/adapters-api/dist/model/CreateStepApiModel.js +131 -0
- package/lib/adapters-api/dist/model/CreateWorkItemApiModel.js +384 -0
- package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +184 -0
- package/lib/adapters-api/dist/model/CustomAttributeGetModel.js +184 -0
- package/lib/adapters-api/dist/model/CustomAttributeOptionApiResult.js +124 -0
- package/lib/adapters-api/dist/model/CustomAttributeOptionModel.js +124 -0
- package/lib/adapters-api/dist/model/CustomAttributePutModel.js +182 -0
- package/lib/adapters-api/dist/model/CustomAttributeType.js +73 -0
- package/lib/adapters-api/dist/model/CustomAttributeTypesEnum.js +73 -0
- package/lib/adapters-api/dist/model/DateTimeRangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/DeletionState.js +55 -0
- package/lib/adapters-api/dist/model/DetailedProjectApiResult.js +204 -0
- package/lib/adapters-api/dist/model/FailureCategoryModel.js +67 -0
- package/lib/adapters-api/dist/model/GuidExtractionModel.js +90 -0
- package/lib/adapters-api/dist/model/ImageResizeType.js +49 -0
- package/lib/adapters-api/dist/model/Int32RangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/Int64RangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/IterationApiResult.js +109 -0
- package/lib/adapters-api/dist/model/IterationModel.js +109 -0
- package/lib/adapters-api/dist/model/LabelApiModel.js +100 -0
- package/lib/adapters-api/dist/model/LabelApiResult.js +100 -0
- package/lib/adapters-api/dist/model/LabelShortModel.js +100 -0
- package/lib/adapters-api/dist/model/LinkApiResult.js +140 -0
- package/lib/adapters-api/dist/model/LinkCreateApiModel.js +127 -0
- package/lib/adapters-api/dist/model/LinkModel.js +149 -0
- package/lib/adapters-api/dist/model/LinkPostModel.js +137 -0
- package/lib/adapters-api/dist/model/LinkPutModel.js +149 -0
- package/lib/adapters-api/dist/model/LinkShortApiResult.js +126 -0
- package/lib/adapters-api/dist/model/LinkType.js +73 -0
- package/lib/adapters-api/dist/model/LinkUpdateApiModel.js +140 -0
- package/lib/adapters-api/dist/model/ManualRerunApiResult.js +84 -0
- package/lib/adapters-api/dist/model/ManualRerunSelectTestResultsApiModel.js +109 -0
- package/lib/adapters-api/dist/model/ManualRerunTestResultApiModel.js +81 -0
- package/lib/adapters-api/dist/model/Operation.js +110 -0
- package/lib/adapters-api/dist/model/ParameterApiResult.js +154 -0
- package/lib/adapters-api/dist/model/ParameterIterationModel.js +100 -0
- package/lib/adapters-api/dist/model/ParameterShortApiResult.js +132 -0
- package/lib/adapters-api/dist/model/ParameterShortModel.js +158 -0
- package/lib/adapters-api/dist/model/ParametersFilterApiModel.js +98 -0
- package/lib/adapters-api/dist/model/ProblemDetails.js +124 -0
- package/lib/adapters-api/dist/model/ProjectApiResult.js +165 -0
- package/lib/adapters-api/dist/model/ProjectAttributesFilterModel.js +132 -0
- package/lib/adapters-api/dist/model/ProjectTypeModel.js +49 -0
- package/lib/adapters-api/dist/model/ProjectsFilterModel.js +209 -0
- package/lib/adapters-api/dist/model/SectionModel.js +180 -0
- package/lib/adapters-api/dist/model/SectionPostModel.js +178 -0
- package/lib/adapters-api/dist/model/SectionWithStepsModel.js +242 -0
- package/lib/adapters-api/dist/model/SharedStepModel.js +145 -0
- package/lib/adapters-api/dist/model/SharedStepResultApiModel.js +102 -0
- package/lib/adapters-api/dist/model/StepCommentApiModel.js +207 -0
- package/lib/adapters-api/dist/model/StepModel.js +163 -0
- package/lib/adapters-api/dist/model/StepPostModel.js +126 -0
- package/lib/adapters-api/dist/model/StepResultApiModel.js +149 -0
- package/lib/adapters-api/dist/model/TagModel.js +88 -0
- package/lib/adapters-api/dist/model/TestResultLinkApiResult.js +153 -0
- package/lib/adapters-api/dist/model/TestResultOutcome.js +67 -0
- package/lib/adapters-api/dist/model/TestResultResponse.js +400 -0
- package/lib/adapters-api/dist/model/TestResultShortResponse.js +311 -0
- package/lib/adapters-api/dist/model/TestResultStepCommentUpdateRequest.js +152 -0
- package/lib/adapters-api/dist/model/TestResultUpdateRequest.js +285 -0
- package/lib/adapters-api/dist/model/TestResultsFilterApiModel.js +226 -0
- package/lib/adapters-api/dist/model/TestRunApiResult.js +196 -0
- package/lib/adapters-api/dist/model/TestRunState.js +61 -0
- package/lib/adapters-api/dist/model/TestStatusApiResult.js +114 -0
- package/lib/adapters-api/dist/model/TestStatusApiType.js +67 -0
- package/lib/adapters-api/dist/model/TestStatusModel.js +149 -0
- package/lib/adapters-api/dist/model/TestStatusType.js +67 -0
- package/lib/adapters-api/dist/model/UpdateEmptyTestRunApiModel.js +187 -0
- package/lib/adapters-api/dist/model/UpdateLinkApiModel.js +140 -0
- package/lib/adapters-api/dist/model/ValidationProblemDetails.js +144 -0
- package/lib/adapters-api/dist/model/WorkItemApiResult.js +499 -0
- package/lib/adapters-api/dist/model/WorkItemEntityTypeApiModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemFilterApiModel.js +309 -0
- package/lib/adapters-api/dist/model/WorkItemIdApiModel.js +89 -0
- package/lib/adapters-api/dist/model/WorkItemParameterKeyApiModel.js +89 -0
- package/lib/adapters-api/dist/model/WorkItemParameterKeyApiResult.js +88 -0
- package/lib/adapters-api/dist/model/WorkItemPriorityApiModel.js +67 -0
- package/lib/adapters-api/dist/model/WorkItemPriorityModel.js +67 -0
- package/lib/adapters-api/dist/model/WorkItemSelectApiModel.js +90 -0
- package/lib/adapters-api/dist/model/WorkItemShortApiResult.js +316 -0
- package/lib/adapters-api/dist/model/WorkItemSourceTypeModel.js +49 -0
- package/lib/adapters-api/dist/model/WorkItemStateApiModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemStates.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemTypeModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkflowApiResult.js +111 -0
- package/lib/adapters-api/dist/model/WorkflowStatusApiResult.js +114 -0
- package/lib/adapters-api/index.d.ts +8862 -0
- package/lib/common/base.converter.d.ts +16 -17
- package/lib/common/base.converter.js +12 -14
- package/lib/common/base.service.d.ts +1 -1
- package/lib/common/base.service.js +6 -36
- package/lib/services/attachments/attachments.service.d.ts +1 -2
- package/lib/services/attachments/attachments.service.js +7 -7
- package/lib/services/autotests/autotests.converter.d.ts +2 -3
- package/lib/services/autotests/autotests.converter.js +0 -5
- package/lib/services/autotests/autotests.service.d.ts +1 -2
- package/lib/services/autotests/autotests.service.js +11 -44
- package/lib/services/testresults/testresults.converter.d.ts +4 -5
- package/lib/services/testresults/testresults.converter.js +0 -15
- package/lib/services/testresults/testresults.service.d.ts +2 -3
- package/lib/services/testresults/testresults.service.js +16 -44
- package/lib/services/testresults/testresults.type.d.ts +1 -1
- package/lib/services/testruns/testruns.converter.d.ts +12 -13
- package/lib/services/testruns/testruns.converter.js +19 -8
- package/lib/services/testruns/testruns.service.d.ts +1 -2
- package/lib/services/testruns/testruns.service.js +13 -46
- package/package.json +7 -5
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _AttachmentApiResult = _interopRequireDefault(require("./AttachmentApiResult"));
|
|
9
|
+
var _AutoTest = _interopRequireDefault(require("./AutoTest"));
|
|
10
|
+
var _AutoTestStepResult = _interopRequireDefault(require("./AutoTestStepResult"));
|
|
11
|
+
var _LinkApiResult = _interopRequireDefault(require("./LinkApiResult"));
|
|
12
|
+
var _StepCommentApiModel = _interopRequireDefault(require("./StepCommentApiModel"));
|
|
13
|
+
var _StepResultApiModel = _interopRequireDefault(require("./StepResultApiModel"));
|
|
14
|
+
var _TestResultOutcome = _interopRequireDefault(require("./TestResultOutcome"));
|
|
15
|
+
var _TestStatusApiResult = _interopRequireDefault(require("./TestStatusApiResult"));
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
/**
|
|
18
|
+
* API
|
|
19
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
20
|
+
*
|
|
21
|
+
* The version of the OpenAPI document: adapters
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The TestResultResponse model module.
|
|
32
|
+
* @module model/TestResultResponse
|
|
33
|
+
* @version 1.0.0
|
|
34
|
+
*/
|
|
35
|
+
class TestResultResponse {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>TestResultResponse</code>.
|
|
38
|
+
* @alias module:model/TestResultResponse
|
|
39
|
+
* @param id {String}
|
|
40
|
+
* @param failureClassIds {Array.<String>}
|
|
41
|
+
* @param configurationId {String}
|
|
42
|
+
* @param testRunId {String}
|
|
43
|
+
*/
|
|
44
|
+
constructor(id, failureClassIds, configurationId, testRunId) {
|
|
45
|
+
TestResultResponse.initialize(this, id, failureClassIds, configurationId, testRunId);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the fields of this object.
|
|
50
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
51
|
+
* Only for internal use.
|
|
52
|
+
*/
|
|
53
|
+
static initialize(obj, id, failureClassIds, configurationId, testRunId) {
|
|
54
|
+
obj['id'] = id;
|
|
55
|
+
obj['failureClassIds'] = failureClassIds;
|
|
56
|
+
obj['configurationId'] = configurationId;
|
|
57
|
+
obj['testRunId'] = testRunId;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Constructs a <code>TestResultResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
62
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
63
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
64
|
+
* @param {module:model/TestResultResponse} obj Optional instance to populate.
|
|
65
|
+
* @return {module:model/TestResultResponse} The populated <code>TestResultResponse</code> instance.
|
|
66
|
+
*/
|
|
67
|
+
static constructFromObject(data, obj) {
|
|
68
|
+
if (data) {
|
|
69
|
+
obj = obj || new TestResultResponse();
|
|
70
|
+
if (data.hasOwnProperty('id')) {
|
|
71
|
+
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('stepComments')) {
|
|
74
|
+
obj['stepComments'] = _ApiClient.default.convertToType(data['stepComments'], [_StepCommentApiModel.default]);
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('failureClassIds')) {
|
|
77
|
+
obj['failureClassIds'] = _ApiClient.default.convertToType(data['failureClassIds'], ['String']);
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('outcome')) {
|
|
80
|
+
obj['outcome'] = _ApiClient.default.convertToType(data['outcome'], _TestResultOutcome.default);
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('status')) {
|
|
83
|
+
obj['status'] = _ApiClient.default.convertToType(data['status'], _TestStatusApiResult.default);
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('comment')) {
|
|
86
|
+
obj['comment'] = _ApiClient.default.convertToType(data['comment'], 'String');
|
|
87
|
+
}
|
|
88
|
+
if (data.hasOwnProperty('links')) {
|
|
89
|
+
obj['links'] = _ApiClient.default.convertToType(data['links'], [_LinkApiResult.default]);
|
|
90
|
+
}
|
|
91
|
+
if (data.hasOwnProperty('stepResults')) {
|
|
92
|
+
obj['stepResults'] = _ApiClient.default.convertToType(data['stepResults'], [_StepResultApiModel.default]);
|
|
93
|
+
}
|
|
94
|
+
if (data.hasOwnProperty('attachments')) {
|
|
95
|
+
obj['attachments'] = _ApiClient.default.convertToType(data['attachments'], [_AttachmentApiResult.default]);
|
|
96
|
+
}
|
|
97
|
+
if (data.hasOwnProperty('autoTestId')) {
|
|
98
|
+
obj['autoTestId'] = _ApiClient.default.convertToType(data['autoTestId'], 'String');
|
|
99
|
+
}
|
|
100
|
+
if (data.hasOwnProperty('configurationId')) {
|
|
101
|
+
obj['configurationId'] = _ApiClient.default.convertToType(data['configurationId'], 'String');
|
|
102
|
+
}
|
|
103
|
+
if (data.hasOwnProperty('durationInMs')) {
|
|
104
|
+
obj['durationInMs'] = _ApiClient.default.convertToType(data['durationInMs'], 'Number');
|
|
105
|
+
}
|
|
106
|
+
if (data.hasOwnProperty('traces')) {
|
|
107
|
+
obj['traces'] = _ApiClient.default.convertToType(data['traces'], 'String');
|
|
108
|
+
}
|
|
109
|
+
if (data.hasOwnProperty('failureType')) {
|
|
110
|
+
obj['failureType'] = _ApiClient.default.convertToType(data['failureType'], 'String');
|
|
111
|
+
}
|
|
112
|
+
if (data.hasOwnProperty('message')) {
|
|
113
|
+
obj['message'] = _ApiClient.default.convertToType(data['message'], 'String');
|
|
114
|
+
}
|
|
115
|
+
if (data.hasOwnProperty('testRunId')) {
|
|
116
|
+
obj['testRunId'] = _ApiClient.default.convertToType(data['testRunId'], 'String');
|
|
117
|
+
}
|
|
118
|
+
if (data.hasOwnProperty('autoTest')) {
|
|
119
|
+
obj['autoTest'] = _ApiClient.default.convertToType(data['autoTest'], _AutoTest.default);
|
|
120
|
+
}
|
|
121
|
+
if (data.hasOwnProperty('autoTestStepResults')) {
|
|
122
|
+
obj['autoTestStepResults'] = _ApiClient.default.convertToType(data['autoTestStepResults'], [_AutoTestStepResult.default]);
|
|
123
|
+
}
|
|
124
|
+
if (data.hasOwnProperty('setupResults')) {
|
|
125
|
+
obj['setupResults'] = _ApiClient.default.convertToType(data['setupResults'], [_AutoTestStepResult.default]);
|
|
126
|
+
}
|
|
127
|
+
if (data.hasOwnProperty('teardownResults')) {
|
|
128
|
+
obj['teardownResults'] = _ApiClient.default.convertToType(data['teardownResults'], [_AutoTestStepResult.default]);
|
|
129
|
+
}
|
|
130
|
+
if (data.hasOwnProperty('parameters')) {
|
|
131
|
+
obj['parameters'] = _ApiClient.default.convertToType(data['parameters'], {
|
|
132
|
+
'String': 'String'
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
if (data.hasOwnProperty('properties')) {
|
|
136
|
+
obj['properties'] = _ApiClient.default.convertToType(data['properties'], {
|
|
137
|
+
'String': 'String'
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return obj;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Validates the JSON data with respect to <code>TestResultResponse</code>.
|
|
146
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
147
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TestResultResponse</code>.
|
|
148
|
+
*/
|
|
149
|
+
static validateJSON(data) {
|
|
150
|
+
// check to make sure all required properties are present in the JSON string
|
|
151
|
+
for (const property of TestResultResponse.RequiredProperties) {
|
|
152
|
+
if (!data.hasOwnProperty(property)) {
|
|
153
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// ensure the json data is a string
|
|
157
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
158
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
159
|
+
}
|
|
160
|
+
if (data['stepComments']) {
|
|
161
|
+
// data not null
|
|
162
|
+
// ensure the json data is an array
|
|
163
|
+
if (!Array.isArray(data['stepComments'])) {
|
|
164
|
+
throw new Error("Expected the field `stepComments` to be an array in the JSON data but got " + data['stepComments']);
|
|
165
|
+
}
|
|
166
|
+
// validate the optional field `stepComments` (array)
|
|
167
|
+
for (const item of data['stepComments']) {
|
|
168
|
+
_StepCommentApiModel.default.validateJSON(item);
|
|
169
|
+
}
|
|
170
|
+
;
|
|
171
|
+
}
|
|
172
|
+
// ensure the json data is an array
|
|
173
|
+
if (!Array.isArray(data['failureClassIds'])) {
|
|
174
|
+
throw new Error("Expected the field `failureClassIds` to be an array in the JSON data but got " + data['failureClassIds']);
|
|
175
|
+
}
|
|
176
|
+
// validate the optional field `status`
|
|
177
|
+
if (data['status']) {
|
|
178
|
+
// data not null
|
|
179
|
+
_TestStatusApiResult.default.validateJSON(data['status']);
|
|
180
|
+
}
|
|
181
|
+
// ensure the json data is a string
|
|
182
|
+
if (data['comment'] && !(typeof data['comment'] === 'string' || data['comment'] instanceof String)) {
|
|
183
|
+
throw new Error("Expected the field `comment` to be a primitive type in the JSON string but got " + data['comment']);
|
|
184
|
+
}
|
|
185
|
+
if (data['links']) {
|
|
186
|
+
// data not null
|
|
187
|
+
// ensure the json data is an array
|
|
188
|
+
if (!Array.isArray(data['links'])) {
|
|
189
|
+
throw new Error("Expected the field `links` to be an array in the JSON data but got " + data['links']);
|
|
190
|
+
}
|
|
191
|
+
// validate the optional field `links` (array)
|
|
192
|
+
for (const item of data['links']) {
|
|
193
|
+
_LinkApiResult.default.validateJSON(item);
|
|
194
|
+
}
|
|
195
|
+
;
|
|
196
|
+
}
|
|
197
|
+
if (data['stepResults']) {
|
|
198
|
+
// data not null
|
|
199
|
+
// ensure the json data is an array
|
|
200
|
+
if (!Array.isArray(data['stepResults'])) {
|
|
201
|
+
throw new Error("Expected the field `stepResults` to be an array in the JSON data but got " + data['stepResults']);
|
|
202
|
+
}
|
|
203
|
+
// validate the optional field `stepResults` (array)
|
|
204
|
+
for (const item of data['stepResults']) {
|
|
205
|
+
_StepResultApiModel.default.validateJSON(item);
|
|
206
|
+
}
|
|
207
|
+
;
|
|
208
|
+
}
|
|
209
|
+
if (data['attachments']) {
|
|
210
|
+
// data not null
|
|
211
|
+
// ensure the json data is an array
|
|
212
|
+
if (!Array.isArray(data['attachments'])) {
|
|
213
|
+
throw new Error("Expected the field `attachments` to be an array in the JSON data but got " + data['attachments']);
|
|
214
|
+
}
|
|
215
|
+
// validate the optional field `attachments` (array)
|
|
216
|
+
for (const item of data['attachments']) {
|
|
217
|
+
_AttachmentApiResult.default.validateJSON(item);
|
|
218
|
+
}
|
|
219
|
+
;
|
|
220
|
+
}
|
|
221
|
+
// ensure the json data is a string
|
|
222
|
+
if (data['autoTestId'] && !(typeof data['autoTestId'] === 'string' || data['autoTestId'] instanceof String)) {
|
|
223
|
+
throw new Error("Expected the field `autoTestId` to be a primitive type in the JSON string but got " + data['autoTestId']);
|
|
224
|
+
}
|
|
225
|
+
// ensure the json data is a string
|
|
226
|
+
if (data['configurationId'] && !(typeof data['configurationId'] === 'string' || data['configurationId'] instanceof String)) {
|
|
227
|
+
throw new Error("Expected the field `configurationId` to be a primitive type in the JSON string but got " + data['configurationId']);
|
|
228
|
+
}
|
|
229
|
+
// ensure the json data is a string
|
|
230
|
+
if (data['traces'] && !(typeof data['traces'] === 'string' || data['traces'] instanceof String)) {
|
|
231
|
+
throw new Error("Expected the field `traces` to be a primitive type in the JSON string but got " + data['traces']);
|
|
232
|
+
}
|
|
233
|
+
// ensure the json data is a string
|
|
234
|
+
if (data['failureType'] && !(typeof data['failureType'] === 'string' || data['failureType'] instanceof String)) {
|
|
235
|
+
throw new Error("Expected the field `failureType` to be a primitive type in the JSON string but got " + data['failureType']);
|
|
236
|
+
}
|
|
237
|
+
// ensure the json data is a string
|
|
238
|
+
if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
|
|
239
|
+
throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
|
|
240
|
+
}
|
|
241
|
+
// ensure the json data is a string
|
|
242
|
+
if (data['testRunId'] && !(typeof data['testRunId'] === 'string' || data['testRunId'] instanceof String)) {
|
|
243
|
+
throw new Error("Expected the field `testRunId` to be a primitive type in the JSON string but got " + data['testRunId']);
|
|
244
|
+
}
|
|
245
|
+
// validate the optional field `autoTest`
|
|
246
|
+
if (data['autoTest']) {
|
|
247
|
+
// data not null
|
|
248
|
+
_AutoTest.default.validateJSON(data['autoTest']);
|
|
249
|
+
}
|
|
250
|
+
if (data['autoTestStepResults']) {
|
|
251
|
+
// data not null
|
|
252
|
+
// ensure the json data is an array
|
|
253
|
+
if (!Array.isArray(data['autoTestStepResults'])) {
|
|
254
|
+
throw new Error("Expected the field `autoTestStepResults` to be an array in the JSON data but got " + data['autoTestStepResults']);
|
|
255
|
+
}
|
|
256
|
+
// validate the optional field `autoTestStepResults` (array)
|
|
257
|
+
for (const item of data['autoTestStepResults']) {
|
|
258
|
+
_AutoTestStepResult.default.validateJSON(item);
|
|
259
|
+
}
|
|
260
|
+
;
|
|
261
|
+
}
|
|
262
|
+
if (data['setupResults']) {
|
|
263
|
+
// data not null
|
|
264
|
+
// ensure the json data is an array
|
|
265
|
+
if (!Array.isArray(data['setupResults'])) {
|
|
266
|
+
throw new Error("Expected the field `setupResults` to be an array in the JSON data but got " + data['setupResults']);
|
|
267
|
+
}
|
|
268
|
+
// validate the optional field `setupResults` (array)
|
|
269
|
+
for (const item of data['setupResults']) {
|
|
270
|
+
_AutoTestStepResult.default.validateJSON(item);
|
|
271
|
+
}
|
|
272
|
+
;
|
|
273
|
+
}
|
|
274
|
+
if (data['teardownResults']) {
|
|
275
|
+
// data not null
|
|
276
|
+
// ensure the json data is an array
|
|
277
|
+
if (!Array.isArray(data['teardownResults'])) {
|
|
278
|
+
throw new Error("Expected the field `teardownResults` to be an array in the JSON data but got " + data['teardownResults']);
|
|
279
|
+
}
|
|
280
|
+
// validate the optional field `teardownResults` (array)
|
|
281
|
+
for (const item of data['teardownResults']) {
|
|
282
|
+
_AutoTestStepResult.default.validateJSON(item);
|
|
283
|
+
}
|
|
284
|
+
;
|
|
285
|
+
}
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
TestResultResponse.RequiredProperties = ["id", "failureClassIds", "configurationId", "testRunId"];
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* @member {String} id
|
|
293
|
+
*/
|
|
294
|
+
TestResultResponse.prototype['id'] = undefined;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* @member {Array.<module:model/StepCommentApiModel>} stepComments
|
|
298
|
+
*/
|
|
299
|
+
TestResultResponse.prototype['stepComments'] = undefined;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* @member {Array.<String>} failureClassIds
|
|
303
|
+
*/
|
|
304
|
+
TestResultResponse.prototype['failureClassIds'] = undefined;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* @member {module:model/TestResultOutcome} outcome
|
|
308
|
+
*/
|
|
309
|
+
TestResultResponse.prototype['outcome'] = undefined;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* @member {module:model/TestStatusApiResult} status
|
|
313
|
+
*/
|
|
314
|
+
TestResultResponse.prototype['status'] = undefined;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @member {String} comment
|
|
318
|
+
*/
|
|
319
|
+
TestResultResponse.prototype['comment'] = undefined;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* @member {Array.<module:model/LinkApiResult>} links
|
|
323
|
+
*/
|
|
324
|
+
TestResultResponse.prototype['links'] = undefined;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* @member {Array.<module:model/StepResultApiModel>} stepResults
|
|
328
|
+
*/
|
|
329
|
+
TestResultResponse.prototype['stepResults'] = undefined;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* @member {Array.<module:model/AttachmentApiResult>} attachments
|
|
333
|
+
*/
|
|
334
|
+
TestResultResponse.prototype['attachments'] = undefined;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* @member {String} autoTestId
|
|
338
|
+
*/
|
|
339
|
+
TestResultResponse.prototype['autoTestId'] = undefined;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* @member {String} configurationId
|
|
343
|
+
*/
|
|
344
|
+
TestResultResponse.prototype['configurationId'] = undefined;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* @member {Number} durationInMs
|
|
348
|
+
*/
|
|
349
|
+
TestResultResponse.prototype['durationInMs'] = undefined;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* @member {String} traces
|
|
353
|
+
*/
|
|
354
|
+
TestResultResponse.prototype['traces'] = undefined;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* @member {String} failureType
|
|
358
|
+
*/
|
|
359
|
+
TestResultResponse.prototype['failureType'] = undefined;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* @member {String} message
|
|
363
|
+
*/
|
|
364
|
+
TestResultResponse.prototype['message'] = undefined;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* @member {String} testRunId
|
|
368
|
+
*/
|
|
369
|
+
TestResultResponse.prototype['testRunId'] = undefined;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* @member {module:model/AutoTest} autoTest
|
|
373
|
+
*/
|
|
374
|
+
TestResultResponse.prototype['autoTest'] = undefined;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* @member {Array.<module:model/AutoTestStepResult>} autoTestStepResults
|
|
378
|
+
*/
|
|
379
|
+
TestResultResponse.prototype['autoTestStepResults'] = undefined;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* @member {Array.<module:model/AutoTestStepResult>} setupResults
|
|
383
|
+
*/
|
|
384
|
+
TestResultResponse.prototype['setupResults'] = undefined;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* @member {Array.<module:model/AutoTestStepResult>} teardownResults
|
|
388
|
+
*/
|
|
389
|
+
TestResultResponse.prototype['teardownResults'] = undefined;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* @member {Object.<String, String>} parameters
|
|
393
|
+
*/
|
|
394
|
+
TestResultResponse.prototype['parameters'] = undefined;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* @member {Object.<String, String>} properties
|
|
398
|
+
*/
|
|
399
|
+
TestResultResponse.prototype['properties'] = undefined;
|
|
400
|
+
var _default = exports.default = TestResultResponse;
|