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
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TestRunConverter = void 0;
|
|
4
|
-
const testit_api_client_1 = require("testit-api-client");
|
|
5
4
|
const common_1 = require("../../common");
|
|
6
5
|
const autotests_1 = require("../autotests");
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
7
|
+
const AdaptersApi = require("../../adapters-api/dist/index");
|
|
8
|
+
const TestRunStateEnum = AdaptersApi.TestRunState;
|
|
7
9
|
class TestRunConverter extends common_1.BaseConverter {
|
|
8
10
|
constructor(config) {
|
|
9
11
|
super(config);
|
|
@@ -11,18 +13,18 @@ class TestRunConverter extends common_1.BaseConverter {
|
|
|
11
13
|
}
|
|
12
14
|
toLocalState(state) {
|
|
13
15
|
// @ts-ignore
|
|
14
|
-
return
|
|
16
|
+
return TestRunStateEnum[state];
|
|
15
17
|
}
|
|
16
18
|
toOriginState(state) {
|
|
17
19
|
// @ts-ignore
|
|
18
|
-
return
|
|
20
|
+
return TestRunStateEnum[state];
|
|
19
21
|
}
|
|
20
22
|
mapToStatusType(status) {
|
|
21
23
|
const statusMap = {
|
|
22
24
|
Passed: "Succeeded",
|
|
23
25
|
Failed: "Failed",
|
|
24
26
|
Blocked: "Incomplete",
|
|
25
|
-
Skipped: "Incomplete"
|
|
27
|
+
Skipped: "Incomplete",
|
|
26
28
|
};
|
|
27
29
|
return statusMap[status];
|
|
28
30
|
}
|
|
@@ -49,7 +51,7 @@ class TestRunConverter extends common_1.BaseConverter {
|
|
|
49
51
|
outcome: undefined,
|
|
50
52
|
startedOn: undefined,
|
|
51
53
|
completedOn: undefined,
|
|
52
|
-
duration: undefined
|
|
54
|
+
duration: undefined,
|
|
53
55
|
};
|
|
54
56
|
if (autotest.duration !== undefined) {
|
|
55
57
|
model.duration = autotest.duration;
|
|
@@ -83,7 +85,7 @@ class TestRunConverter extends common_1.BaseConverter {
|
|
|
83
85
|
return model;
|
|
84
86
|
}
|
|
85
87
|
toLocalTestRun(testRun) {
|
|
86
|
-
var _a, _b, _c, _d;
|
|
88
|
+
var _a, _b, _c, _d, _e, _f;
|
|
87
89
|
return {
|
|
88
90
|
id: testRun.id,
|
|
89
91
|
name: testRun.name,
|
|
@@ -92,8 +94,17 @@ class TestRunConverter extends common_1.BaseConverter {
|
|
|
92
94
|
description: (_c = testRun.description) !== null && _c !== void 0 ? _c : undefined,
|
|
93
95
|
launchSource: (_d = testRun.launchSource) !== null && _d !== void 0 ? _d : undefined,
|
|
94
96
|
stateName: this.toLocalState(testRun.stateName),
|
|
95
|
-
attachments: testRun.attachments,
|
|
96
|
-
links: testRun.links
|
|
97
|
+
attachments: (_e = testRun.attachments) === null || _e === void 0 ? void 0 : _e.map((a) => ({ id: a.id })),
|
|
98
|
+
links: (_f = testRun.links) === null || _f === void 0 ? void 0 : _f.map((link) => {
|
|
99
|
+
var _a;
|
|
100
|
+
return ({
|
|
101
|
+
url: link.url,
|
|
102
|
+
id: link.id,
|
|
103
|
+
title: link.title,
|
|
104
|
+
description: link.description,
|
|
105
|
+
hasInfo: (_a = link.hasInfo) !== null && _a !== void 0 ? _a : true,
|
|
106
|
+
});
|
|
107
|
+
}),
|
|
97
108
|
};
|
|
98
109
|
}
|
|
99
110
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as TestitApiClient from "testit-api-client";
|
|
2
1
|
import { AdapterConfig, BaseService } from "../../common";
|
|
3
2
|
import { type ITestRunsService, TestRunId, AutotestResult, TestRunGet } from "./testruns.type";
|
|
4
3
|
import { type ITestRunConverter } from "./testruns.converter";
|
|
5
4
|
export declare class TestRunsService extends BaseService implements ITestRunsService {
|
|
6
5
|
protected readonly config: AdapterConfig;
|
|
7
|
-
protected _client:
|
|
6
|
+
protected _client: any;
|
|
8
7
|
protected _converter: ITestRunConverter;
|
|
9
8
|
private readonly _testResults;
|
|
10
9
|
/** testResultId by autoTestExternalId within current run (InProgress POST + search). */
|
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -46,8 +13,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
46
13
|
};
|
|
47
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
15
|
exports.TestRunsService = void 0;
|
|
49
|
-
// @
|
|
50
|
-
const
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
17
|
+
const AdaptersApi = require("../../adapters-api/dist/index");
|
|
51
18
|
const common_1 = require("../../common");
|
|
52
19
|
const utils_1 = require("../../common/utils");
|
|
53
20
|
const testresults_1 = require("../testresults");
|
|
@@ -60,7 +27,7 @@ class TestRunsService extends common_1.BaseService {
|
|
|
60
27
|
this.config = config;
|
|
61
28
|
/** testResultId by autoTestExternalId within current run (InProgress POST + search). */
|
|
62
29
|
this.testResultIdsByExternalId = new Map();
|
|
63
|
-
this._client = new
|
|
30
|
+
this._client = new AdaptersApi.TestRunsApi(AdaptersApi.ApiClient.instance);
|
|
64
31
|
this._converter = new testruns_converter_1.TestRunConverter(config);
|
|
65
32
|
this._testResults = new testresults_1.TestResultsService(config);
|
|
66
33
|
}
|
|
@@ -71,10 +38,10 @@ class TestRunsService extends common_1.BaseService {
|
|
|
71
38
|
name: this.config.testRunName,
|
|
72
39
|
};
|
|
73
40
|
return yield this._client
|
|
74
|
-
.
|
|
41
|
+
.adaptersTestRunsPost({ createEmptyTestRunApiModel: (0, utils_1.escapeHtmlInObject)(createRequest) })
|
|
75
42
|
// @ts-ignore
|
|
76
43
|
.then((response) => {
|
|
77
|
-
const data = response.body || response;
|
|
44
|
+
const data = (response === null || response === void 0 ? void 0 : response.body) || response;
|
|
78
45
|
if (!data) {
|
|
79
46
|
throw new Error("API returned undefined response");
|
|
80
47
|
}
|
|
@@ -92,10 +59,10 @@ class TestRunsService extends common_1.BaseService {
|
|
|
92
59
|
getTestRun(testRunId) {
|
|
93
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
61
|
return yield this._client
|
|
95
|
-
.
|
|
62
|
+
.adaptersTestRunsIdGet(testRunId)
|
|
96
63
|
// @ts-ignore
|
|
97
64
|
.then((response) => {
|
|
98
|
-
const data = response.body || response;
|
|
65
|
+
const data = (response === null || response === void 0 ? void 0 : response.body) || response;
|
|
99
66
|
return data;
|
|
100
67
|
})
|
|
101
68
|
// @ts-ignore
|
|
@@ -105,11 +72,11 @@ class TestRunsService extends common_1.BaseService {
|
|
|
105
72
|
updateTestRun(testRun) {
|
|
106
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
74
|
yield this._client
|
|
108
|
-
.
|
|
75
|
+
.adaptersTestRunsPut({ updateEmptyTestRunApiModel: testRun })
|
|
109
76
|
// @ts-ignore
|
|
110
77
|
.then((response) => {
|
|
111
|
-
logger_1.default.log("Full response from
|
|
112
|
-
const data = response.body || response;
|
|
78
|
+
logger_1.default.log("Full response from adaptersTestRunsPut:", response);
|
|
79
|
+
const data = (response === null || response === void 0 ? void 0 : response.body) || response;
|
|
113
80
|
if (!data) {
|
|
114
81
|
throw new Error("API returned undefined response");
|
|
115
82
|
}
|
|
@@ -124,7 +91,7 @@ class TestRunsService extends common_1.BaseService {
|
|
|
124
91
|
try {
|
|
125
92
|
const testRun = yield this.getTestRun(testRunId);
|
|
126
93
|
if (testRun.stateName === "NotStarted") {
|
|
127
|
-
yield this._client.
|
|
94
|
+
yield this._client.adaptersTestRunsIdStartPost(testRunId);
|
|
128
95
|
}
|
|
129
96
|
}
|
|
130
97
|
catch (err) {
|
|
@@ -137,7 +104,7 @@ class TestRunsService extends common_1.BaseService {
|
|
|
137
104
|
try {
|
|
138
105
|
const testRun = yield this.getTestRun(testRunId);
|
|
139
106
|
if (testRun.stateName === "InProgress") {
|
|
140
|
-
yield this._client.
|
|
107
|
+
yield this._client.adaptersTestRunsIdCompletePost(testRunId);
|
|
141
108
|
}
|
|
142
109
|
}
|
|
143
110
|
catch (err) {
|
|
@@ -234,7 +201,7 @@ class TestRunsService extends common_1.BaseService {
|
|
|
234
201
|
sendAutotestResultWithRetry(testRunId, autotestResult) {
|
|
235
202
|
return __awaiter(this, void 0, void 0, function* () {
|
|
236
203
|
var _a;
|
|
237
|
-
const ids = yield (0, utils_1.withHttpRetry)(() => this._client.
|
|
204
|
+
const ids = yield (0, utils_1.withHttpRetry)(() => this._client.adaptersTestRunsIdTestResultsPost(testRunId, {
|
|
238
205
|
autoTestResultsForTestRunModel: [autotestResult],
|
|
239
206
|
}), {
|
|
240
207
|
label: `setAutoTestResults:${autotestResult.autoTestExternalId}:${(_a = autotestResult.statusCode) !== null && _a !== void 0 ? _a : autotestResult.statusType}`,
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testit-js-commons",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "JavaScript commons for Test IT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"source": "src/index.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"prebuild": "npm install && npm --prefix src/sync-storage install && npm --prefix src/sync-storage run build",
|
|
10
|
-
"build": "tsc && npm run copy:sync-storage",
|
|
9
|
+
"prebuild": "npm install && npm --prefix src/sync-storage install && npm --prefix src/sync-storage run build && npm --prefix src/adapters-api install && npm --prefix src/adapters-api run build",
|
|
10
|
+
"build": "tsc && npm run copy:adapters-api && npm run copy:sync-storage",
|
|
11
|
+
"copy:adapters-api": "node -e \"const fs=require('fs');fs.rmSync('lib/adapters-api',{recursive:true,force:true});fs.mkdirSync('lib/adapters-api',{recursive:true});fs.cpSync('src/adapters-api/dist','lib/adapters-api/dist',{recursive:true});fs.copyFileSync('src/adapters-api/index.d.ts','lib/adapters-api/index.d.ts');\"",
|
|
11
12
|
"copy:sync-storage": "node -e \"const fs=require('fs');fs.rmSync('lib/sync-storage',{recursive:true,force:true});fs.mkdirSync('lib/sync-storage',{recursive:true});fs.cpSync('src/sync-storage/dist','lib/sync-storage/dist',{recursive:true});fs.copyFileSync('src/sync-storage/index.d.ts','lib/sync-storage/index.d.ts');\"",
|
|
12
|
-
"pretest": "npm --prefix src/sync-storage run build",
|
|
13
|
+
"pretest": "npm --prefix src/sync-storage run build && npm --prefix src/adapters-api run build",
|
|
13
14
|
"watch": "tsc -w",
|
|
14
15
|
"test": "jest",
|
|
15
16
|
"test:watch": "jest --watch",
|
|
@@ -39,10 +40,11 @@
|
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
42
|
"dotenv": "^16.0.3",
|
|
42
|
-
"
|
|
43
|
+
"superagent": "^10.3.0"
|
|
43
44
|
},
|
|
44
45
|
"files": [
|
|
45
46
|
"lib",
|
|
47
|
+
"lib/adapters-api",
|
|
46
48
|
"lib/sync-storage"
|
|
47
49
|
]
|
|
48
50
|
}
|