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,24 +1,23 @@
|
|
|
1
|
-
import { AvailableTestResultOutcome, LinkPostModel, LinkType as OriginLinkType, AttachmentPutModelAutoTestStepResultsModel, LinkPutModel, AutoTestStepModel } from "testit-api-client";
|
|
2
1
|
import { AdapterConfig, Link, LinkType, Outcome, ShortStep, Step } from "./types";
|
|
3
2
|
export interface IBaseConverter {
|
|
4
|
-
toOriginOutcome(outcome: Outcome):
|
|
5
|
-
toLocalOutcome(outcome:
|
|
6
|
-
toOriginLinkType(linkType: LinkType):
|
|
7
|
-
toLocalLinkType(linkType:
|
|
8
|
-
toOriginLink(link: Link):
|
|
9
|
-
toLocalLink(link:
|
|
10
|
-
toLocalShortStep(step:
|
|
11
|
-
toOriginStep(step: Step):
|
|
3
|
+
toOriginOutcome(outcome: Outcome): any;
|
|
4
|
+
toLocalOutcome(outcome: any): Outcome;
|
|
5
|
+
toOriginLinkType(linkType: LinkType): any;
|
|
6
|
+
toLocalLinkType(linkType: any): LinkType;
|
|
7
|
+
toOriginLink(link: Link): any;
|
|
8
|
+
toLocalLink(link: any): Link;
|
|
9
|
+
toLocalShortStep(step: any): ShortStep;
|
|
10
|
+
toOriginStep(step: Step): any;
|
|
12
11
|
}
|
|
13
12
|
export declare class BaseConverter implements IBaseConverter {
|
|
14
13
|
protected readonly config: AdapterConfig;
|
|
15
14
|
constructor(config: AdapterConfig);
|
|
16
|
-
toOriginOutcome(outcome: Outcome):
|
|
17
|
-
toLocalOutcome(outcome:
|
|
18
|
-
toOriginLinkType(linkType: LinkType):
|
|
19
|
-
toLocalLinkType(linkType:
|
|
20
|
-
toOriginLink(link: Link):
|
|
21
|
-
toLocalLink(link:
|
|
22
|
-
toLocalShortStep(step:
|
|
23
|
-
toOriginStep(step: Step):
|
|
15
|
+
toOriginOutcome(outcome: Outcome): any;
|
|
16
|
+
toLocalOutcome(outcome: any): Outcome;
|
|
17
|
+
toOriginLinkType(linkType: LinkType): any;
|
|
18
|
+
toLocalLinkType(linkType: any): LinkType;
|
|
19
|
+
toOriginLink(link: Link): any;
|
|
20
|
+
toLocalLink(link: any): Link;
|
|
21
|
+
toLocalShortStep(step: any): ShortStep;
|
|
22
|
+
toOriginStep(step: Step): any;
|
|
24
23
|
}
|
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseConverter = void 0;
|
|
4
|
-
|
|
4
|
+
// Generated adapters-api client is bundled into lib/adapters-api/dist during build.
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
6
|
+
const AdaptersApi = require("../adapters-api/dist/index");
|
|
7
|
+
const AvailableTestResultOutcomeEnum = AdaptersApi.AvailableTestResultOutcome;
|
|
8
|
+
const OriginLinkTypeEnum = AdaptersApi.LinkType;
|
|
5
9
|
class BaseConverter {
|
|
6
10
|
constructor(config) {
|
|
7
11
|
this.config = config;
|
|
8
12
|
}
|
|
9
13
|
toOriginOutcome(outcome) {
|
|
10
14
|
// @ts-ignore
|
|
11
|
-
return
|
|
15
|
+
return AvailableTestResultOutcomeEnum[outcome];
|
|
12
16
|
}
|
|
13
17
|
toLocalOutcome(outcome) {
|
|
14
18
|
// @ts-ignore
|
|
15
|
-
return
|
|
19
|
+
return AvailableTestResultOutcomeEnum[outcome];
|
|
16
20
|
}
|
|
17
21
|
toOriginLinkType(linkType) {
|
|
18
22
|
// @ts-ignore
|
|
19
|
-
return
|
|
23
|
+
return OriginLinkTypeEnum[linkType];
|
|
20
24
|
}
|
|
21
25
|
toLocalLinkType(linkType) {
|
|
22
26
|
// @ts-ignore
|
|
23
|
-
return
|
|
27
|
+
return OriginLinkTypeEnum[linkType];
|
|
24
28
|
}
|
|
25
29
|
toOriginLink(link) {
|
|
26
|
-
|
|
27
|
-
let type = defaultType;
|
|
30
|
+
let type = "Related";
|
|
28
31
|
if (link.type) {
|
|
29
32
|
const mapped = this.toOriginLinkType(link.type);
|
|
30
33
|
if (mapped != null) {
|
|
31
34
|
type = mapped;
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
|
-
// @ts-ignore
|
|
35
37
|
return Object.assign(Object.assign({}, link), { type, hasInfo: true });
|
|
36
38
|
}
|
|
37
39
|
toLocalLink(link) {
|
|
@@ -48,30 +50,26 @@ class BaseConverter {
|
|
|
48
50
|
return {
|
|
49
51
|
title: step.title,
|
|
50
52
|
description: (_a = step.description) !== null && _a !== void 0 ? _a : undefined,
|
|
51
|
-
|
|
52
|
-
steps: (_b = step.steps) === null || _b === void 0 ? void 0 : _b.map((step) => this.toLocalShortStep(step)),
|
|
53
|
+
steps: (_b = step.steps) === null || _b === void 0 ? void 0 : _b.map((s) => this.toLocalShortStep(s)),
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
56
|
toOriginStep(step) {
|
|
56
57
|
var _a;
|
|
57
|
-
// @ts-ignore
|
|
58
58
|
const model = {
|
|
59
59
|
title: step.title,
|
|
60
60
|
description: step.description,
|
|
61
61
|
parameters: step.parameters,
|
|
62
62
|
attachments: step.attachments,
|
|
63
63
|
outcome: step.outcome ? step.outcome : undefined,
|
|
64
|
-
stepResults: (_a = step.steps) === null || _a === void 0 ? void 0 : _a.map((
|
|
64
|
+
stepResults: (_a = step.steps) === null || _a === void 0 ? void 0 : _a.map((s) => this.toOriginStep(s)),
|
|
65
65
|
};
|
|
66
66
|
if (step.duration !== undefined) {
|
|
67
67
|
model.duration = step.duration;
|
|
68
68
|
}
|
|
69
69
|
if (step.startedOn !== undefined) {
|
|
70
|
-
// @ts-ignore
|
|
71
70
|
model.startedOn = step.startedOn;
|
|
72
71
|
}
|
|
73
72
|
if (step.completedOn !== undefined) {
|
|
74
|
-
// @ts-ignore
|
|
75
73
|
model.completedOn = step.completedOn;
|
|
76
74
|
}
|
|
77
75
|
return model;
|
|
@@ -1,41 +1,9 @@
|
|
|
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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.BaseService = void 0;
|
|
37
|
-
//
|
|
38
|
-
|
|
4
|
+
// Generated adapters-api client is bundled into lib/adapters-api/dist during build.
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
6
|
+
const AdaptersApi = require("../adapters-api/dist/index");
|
|
39
7
|
class BaseService {
|
|
40
8
|
constructor(config) {
|
|
41
9
|
this.config = config;
|
|
@@ -49,12 +17,14 @@ class BaseService {
|
|
|
49
17
|
throw new Error("Configuration id is not defined");
|
|
50
18
|
if (!config.projectId)
|
|
51
19
|
throw new Error("Project id is not defined");
|
|
52
|
-
const defaultClient =
|
|
20
|
+
const defaultClient = AdaptersApi.ApiClient.instance;
|
|
53
21
|
defaultClient.basePath = config.url;
|
|
22
|
+
// @ts-ignore
|
|
54
23
|
const auth = defaultClient.authentications["PrivateToken"];
|
|
55
24
|
auth.apiKeyPrefix = "PrivateToken";
|
|
56
25
|
auth.apiKey = config.privateToken;
|
|
57
26
|
if (config.certValidation === false) {
|
|
27
|
+
// @ts-ignore
|
|
58
28
|
defaultClient.rejectUnauthorized = config.certValidation;
|
|
59
29
|
}
|
|
60
30
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as TestitApiClient from "testit-api-client";
|
|
2
1
|
import { BaseService, AdapterConfig, Attachment } from "../../common";
|
|
3
2
|
import { IAttachmentsService } from "./attachments.type";
|
|
4
3
|
import { Buffer } from "buffer";
|
|
5
4
|
export declare class AttachmentsService extends BaseService implements IAttachmentsService {
|
|
6
5
|
protected readonly config: AdapterConfig;
|
|
7
|
-
protected _client:
|
|
6
|
+
protected _client: any;
|
|
8
7
|
constructor(config: AdapterConfig);
|
|
9
8
|
uploadTextAttachment(content: string | Buffer, filename?: string): Promise<Attachment[]>;
|
|
10
9
|
uploadAttachments(paths: string[]): Promise<Attachment[]>;
|
|
@@ -46,8 +46,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.AttachmentsService = void 0;
|
|
49
|
-
// @
|
|
50
|
-
const
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
50
|
+
const AdaptersApi = require("../../adapters-api/dist/index");
|
|
51
51
|
const common_1 = require("../../common");
|
|
52
52
|
const buffer_1 = require("buffer");
|
|
53
53
|
const fs = __importStar(require("fs"));
|
|
@@ -59,7 +59,7 @@ class AttachmentsService extends common_1.BaseService {
|
|
|
59
59
|
constructor(config) {
|
|
60
60
|
super(config);
|
|
61
61
|
this.config = config;
|
|
62
|
-
this._client = new
|
|
62
|
+
this._client = new AdaptersApi.AttachmentsApi(AdaptersApi.ApiClient.instance);
|
|
63
63
|
if (this.config.url) {
|
|
64
64
|
this._client.apiClient.basePath = this.config.url.replace(/\/+$/, "");
|
|
65
65
|
}
|
|
@@ -80,8 +80,8 @@ class AttachmentsService extends common_1.BaseService {
|
|
|
80
80
|
const fileStream = fs.createReadStream(tempFilePath);
|
|
81
81
|
try {
|
|
82
82
|
// @ts-ignore
|
|
83
|
-
const response = yield this._client.
|
|
84
|
-
const data = response.body || response;
|
|
83
|
+
const response = yield this._client.adaptersAttachmentsPost({ file: fileStream });
|
|
84
|
+
const data = (response === null || response === void 0 ? void 0 : response.body) || response;
|
|
85
85
|
return data.id;
|
|
86
86
|
}
|
|
87
87
|
finally {
|
|
@@ -130,8 +130,8 @@ class AttachmentsService extends common_1.BaseService {
|
|
|
130
130
|
const fileStream = common_1.Utils.readStream(path);
|
|
131
131
|
try {
|
|
132
132
|
// @ts-ignore
|
|
133
|
-
const response = yield this._client.
|
|
134
|
-
const data = response.body || response;
|
|
133
|
+
const response = yield this._client.adaptersAttachmentsPost({ file: fileStream });
|
|
134
|
+
const data = (response === null || response === void 0 ? void 0 : response.body) || response;
|
|
135
135
|
return data.id;
|
|
136
136
|
}
|
|
137
137
|
finally {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { AutoTestApiResult } from "testit-api-client";
|
|
2
1
|
import { BaseConverter, AdapterConfig } from "../../common";
|
|
3
2
|
import { AutotestGet, AutotestPost } from "./autotests.type";
|
|
4
3
|
export interface IAutotestConverter {
|
|
5
4
|
toOriginAutotest(autotest: AutotestPost): any;
|
|
6
|
-
toLocalAutotest(autotest:
|
|
5
|
+
toLocalAutotest(autotest: any): AutotestGet;
|
|
7
6
|
}
|
|
8
7
|
export declare class AutotestConverter extends BaseConverter implements IAutotestConverter {
|
|
9
8
|
constructor(config: AdapterConfig);
|
|
10
9
|
toOriginAutotest(autotest: AutotestPost): any;
|
|
11
|
-
toLocalAutotest(autotest:
|
|
10
|
+
toLocalAutotest(autotest: any): AutotestGet;
|
|
12
11
|
}
|
|
@@ -32,18 +32,13 @@ class AutotestConverter extends common_1.BaseConverter {
|
|
|
32
32
|
id: autotest.id,
|
|
33
33
|
name: (_a = autotest.name) !== null && _a !== void 0 ? _a : undefined,
|
|
34
34
|
externalId: (_b = autotest.externalId) !== null && _b !== void 0 ? _b : undefined,
|
|
35
|
-
// @ts-ignore
|
|
36
35
|
links: (_c = autotest.links) === null || _c === void 0 ? void 0 : _c.map((link) => this.toLocalLink(link)),
|
|
37
36
|
namespace: (_d = autotest.namespace) !== null && _d !== void 0 ? _d : undefined,
|
|
38
37
|
classname: (_e = autotest.classname) !== null && _e !== void 0 ? _e : undefined,
|
|
39
|
-
// @ts-ignore
|
|
40
38
|
steps: (_f = autotest.steps) === null || _f === void 0 ? void 0 : _f.map((step) => this.toLocalShortStep(step)),
|
|
41
|
-
// @ts-ignore
|
|
42
39
|
setup: (_g = autotest.setup) === null || _g === void 0 ? void 0 : _g.map((step) => this.toLocalShortStep(step)),
|
|
43
|
-
// @ts-ignore
|
|
44
40
|
teardown: (_h = autotest.teardown) === null || _h === void 0 ? void 0 : _h.map((step) => this.toLocalShortStep(step)),
|
|
45
41
|
labels: (_j = autotest.labels) !== null && _j !== void 0 ? _j : undefined,
|
|
46
|
-
// @ts-ignore
|
|
47
42
|
tags: (_k = autotest.tags) !== null && _k !== void 0 ? _k : undefined,
|
|
48
43
|
};
|
|
49
44
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as TestitApiClient from "testit-api-client";
|
|
2
1
|
import { BaseService, AdapterConfig } from "../../common";
|
|
3
2
|
import { AutotestGet, AutotestPost, type IAutotestService } from "./autotests.type";
|
|
4
3
|
import { type IAutotestConverter } from "./autotests.converter";
|
|
5
4
|
export declare class AutotestsService extends BaseService implements IAutotestService {
|
|
6
5
|
protected readonly config: AdapterConfig;
|
|
7
|
-
protected _client:
|
|
6
|
+
protected _client: any;
|
|
8
7
|
protected _converter: IAutotestConverter;
|
|
9
8
|
constructor(config: AdapterConfig);
|
|
10
9
|
createAutotest(autotest: AutotestPost): Promise<void>;
|
|
@@ -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.AutotestsService = 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 autotests_converter_1 = require("./autotests.converter");
|
|
53
20
|
const autotests_handler_1 = require("./autotests.handler");
|
|
@@ -56,7 +23,7 @@ class AutotestsService extends common_1.BaseService {
|
|
|
56
23
|
constructor(config) {
|
|
57
24
|
super(config);
|
|
58
25
|
this.config = config;
|
|
59
|
-
this._client = new
|
|
26
|
+
this._client = new AdaptersApi.AutoTestsApi(AdaptersApi.ApiClient.instance);
|
|
60
27
|
this._converter = new autotests_converter_1.AutotestConverter(config);
|
|
61
28
|
}
|
|
62
29
|
createAutotest(autotest) {
|
|
@@ -65,7 +32,7 @@ class AutotestsService extends common_1.BaseService {
|
|
|
65
32
|
(0, common_1.escapeHtmlInObject)(autotestPost);
|
|
66
33
|
logger_1.default.debug("[autotests] createAutoTest", { externalId: autotest.externalId, name: autotest.name });
|
|
67
34
|
try {
|
|
68
|
-
yield (0, common_1.withHttpRetry)(() => this._client.
|
|
35
|
+
yield (0, common_1.withHttpRetry)(() => this._client.adaptersAutoTestsPost({ autoTestCreateApiModel: autotestPost }), { label: "createAutoTest" });
|
|
69
36
|
logger_1.default.log(`Create autotest "${autotest.name}".`);
|
|
70
37
|
}
|
|
71
38
|
catch (err) {
|
|
@@ -88,7 +55,7 @@ class AutotestsService extends common_1.BaseService {
|
|
|
88
55
|
(0, common_1.escapeHtmlInObject)(autotestPost);
|
|
89
56
|
logger_1.default.debug("[autotests] updateAutoTest", { externalId: autotest.externalId, name: autotest.name });
|
|
90
57
|
yield (0, common_1.withHttpRetry)(() => this._client
|
|
91
|
-
.
|
|
58
|
+
.adaptersAutoTestsPut({ autoTestUpdateApiModel: autotestPost }), { label: "updateAutoTest" })
|
|
92
59
|
.then(() => logger_1.default.log(`Update autotest "${autotest.name}".`))
|
|
93
60
|
// @ts-ignore
|
|
94
61
|
.catch((err) => (0, autotests_handler_1.handleHttpError)(err, `Failed update autotest "${autotestPost.name}"`));
|
|
@@ -144,7 +111,7 @@ class AutotestsService extends common_1.BaseService {
|
|
|
144
111
|
const promises = workItemIds.map((workItemId) => __awaiter(this, void 0, void 0, function* () {
|
|
145
112
|
var _a, _b;
|
|
146
113
|
try {
|
|
147
|
-
yield this._client.
|
|
114
|
+
yield this._client.adaptersAutoTestsIdWorkItemsPost(internalId, { workItemIdApiModel: { id: workItemId } });
|
|
148
115
|
logger_1.default.log(`Link autotest ${internalId} to workitem ${workItemId} is successfully`);
|
|
149
116
|
}
|
|
150
117
|
catch (e) {
|
|
@@ -157,7 +124,7 @@ class AutotestsService extends common_1.BaseService {
|
|
|
157
124
|
unlinkToWorkItem(internalId, workItemId) {
|
|
158
125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
159
126
|
try {
|
|
160
|
-
yield this._client.
|
|
127
|
+
yield this._client.adaptersAutoTestsIdWorkItemsDelete(internalId, { workItemId: workItemId });
|
|
161
128
|
logger_1.default.log(`Unlink autotest ${internalId} from workitem ${workItemId} is successfully`);
|
|
162
129
|
}
|
|
163
130
|
catch (e) {
|
|
@@ -168,9 +135,9 @@ class AutotestsService extends common_1.BaseService {
|
|
|
168
135
|
getWorkItemsLinkedToAutoTest(internalId) {
|
|
169
136
|
return __awaiter(this, void 0, void 0, function* () {
|
|
170
137
|
return yield this._client
|
|
171
|
-
.
|
|
138
|
+
.adaptersAutoTestsIdWorkItemsGet(internalId, {})
|
|
172
139
|
// @ts-ignore
|
|
173
|
-
.then((res) => res.body)
|
|
140
|
+
.then((res) => (res === null || res === void 0 ? void 0 : res.body) || res || [])
|
|
174
141
|
// @ts-ignore
|
|
175
142
|
.catch((e) => {
|
|
176
143
|
logger_1.default.log(`Cannot get linked workitems to autotest ${internalId}: ${e}`);
|
|
@@ -196,9 +163,9 @@ class AutotestsService extends common_1.BaseService {
|
|
|
196
163
|
includes: includesModel,
|
|
197
164
|
};
|
|
198
165
|
try {
|
|
199
|
-
const response = yield (0, common_1.withHttpRetry)(() => this._client.
|
|
166
|
+
const response = yield (0, common_1.withHttpRetry)(() => this._client.adaptersAutoTestsSearchPost({ autoTestSearchApiModel: requestModel }), { label: `searchAutoTest:${externalId}` });
|
|
200
167
|
// @ts-ignore
|
|
201
|
-
const data = response.body || response;
|
|
168
|
+
const data = (response === null || response === void 0 ? void 0 : response.body) || response;
|
|
202
169
|
const autotest = data ? data[0] : null;
|
|
203
170
|
return autotest ? this._converter.toLocalAutotest(autotest) : null;
|
|
204
171
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { TestResultsFilterApiModel } from "testit-api-client";
|
|
2
1
|
import { AdapterConfig, BaseConverter } from "../../common";
|
|
3
2
|
export interface ITestResultsConverter {
|
|
4
|
-
getTestResultsFilterApiModel():
|
|
5
|
-
getTestResultsFilterForRun():
|
|
3
|
+
getTestResultsFilterApiModel(): any;
|
|
4
|
+
getTestResultsFilterForRun(): any;
|
|
6
5
|
}
|
|
7
6
|
export declare class TestResultsConverter extends BaseConverter implements ITestResultsConverter {
|
|
8
7
|
constructor(config: AdapterConfig);
|
|
9
8
|
private buildRunFilter;
|
|
10
|
-
getTestResultsFilterApiModel():
|
|
11
|
-
getTestResultsFilterForRun():
|
|
9
|
+
getTestResultsFilterApiModel(): any;
|
|
10
|
+
getTestResultsFilterForRun(): any;
|
|
12
11
|
}
|
|
@@ -11,21 +11,6 @@ class TestResultsConverter extends common_1.BaseConverter {
|
|
|
11
11
|
testRunIds: [this.config.testRunId],
|
|
12
12
|
configurationIds: [this.config.configurationId],
|
|
13
13
|
statusTypes,
|
|
14
|
-
statusCodes: undefined,
|
|
15
|
-
outcomes: undefined,
|
|
16
|
-
failureCategories: undefined,
|
|
17
|
-
namespace: undefined,
|
|
18
|
-
className: undefined,
|
|
19
|
-
autoTestGlobalIds: undefined,
|
|
20
|
-
name: undefined,
|
|
21
|
-
createdDate: undefined,
|
|
22
|
-
modifiedDate: undefined,
|
|
23
|
-
startedOn: undefined,
|
|
24
|
-
completedOn: undefined,
|
|
25
|
-
duration: undefined,
|
|
26
|
-
resultReasons: undefined,
|
|
27
|
-
autoTestTags: undefined,
|
|
28
|
-
excludeAutoTestTags: undefined,
|
|
29
14
|
};
|
|
30
15
|
}
|
|
31
16
|
getTestResultsFilterApiModel() {
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import * as TestitApiClient from "testit-api-client";
|
|
2
1
|
import { AdapterConfig, BaseService } from "../../common";
|
|
3
2
|
import { ITestResultsConverter } from "./testresults.converter";
|
|
4
3
|
import { ITestResultsService } from "./testresults.type";
|
|
5
4
|
export declare class TestResultsService extends BaseService implements ITestResultsService {
|
|
6
5
|
protected readonly config: AdapterConfig;
|
|
7
|
-
protected _client:
|
|
6
|
+
protected _client: any;
|
|
8
7
|
protected _converter: ITestResultsConverter;
|
|
9
8
|
protected _testsLimit: number;
|
|
10
9
|
constructor(config: AdapterConfig);
|
|
11
10
|
getExternalIdsForRun(): Promise<string[]>;
|
|
12
11
|
findTestResultIdByExternalId(externalId: string): Promise<string | undefined>;
|
|
13
|
-
updateTestResult(testResultId: string, model:
|
|
12
|
+
updateTestResult(testResultId: string, model: any): Promise<void>;
|
|
14
13
|
private getTestResults;
|
|
15
14
|
}
|
|
@@ -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) {
|
|
@@ -43,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
10
|
};
|
|
44
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
12
|
exports.TestResultsService = void 0;
|
|
46
|
-
// @
|
|
47
|
-
const
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
14
|
+
const AdaptersApi = require("../../adapters-api/dist/index");
|
|
48
15
|
const common_1 = require("../../common");
|
|
49
16
|
const utils_1 = require("../../common/utils");
|
|
50
17
|
const testresults_handler_1 = require("./testresults.handler");
|
|
@@ -54,7 +21,7 @@ class TestResultsService extends common_1.BaseService {
|
|
|
54
21
|
super(config);
|
|
55
22
|
this.config = config;
|
|
56
23
|
this._testsLimit = 100;
|
|
57
|
-
this._client = new
|
|
24
|
+
this._client = new AdaptersApi.TestResultsApi(AdaptersApi.ApiClient.instance);
|
|
58
25
|
this._converter = new testresults_converter_1.TestResultsConverter(config);
|
|
59
26
|
}
|
|
60
27
|
getExternalIdsForRun() {
|
|
@@ -65,8 +32,9 @@ class TestResultsService extends common_1.BaseService {
|
|
|
65
32
|
while (true) {
|
|
66
33
|
const testResults = yield this.getTestResults(skip, model);
|
|
67
34
|
if (testResults.length != 0) {
|
|
68
|
-
externalIds = externalIds.concat(testResults
|
|
69
|
-
|
|
35
|
+
externalIds = externalIds.concat(testResults
|
|
36
|
+
.map((result) => { var _a, _b; return (_a = result.autotestExternalId) !== null && _a !== void 0 ? _a : (_b = result.autoTest) === null || _b === void 0 ? void 0 : _b.externalId; })
|
|
37
|
+
.filter((id) => id !== undefined));
|
|
70
38
|
skip += this._testsLimit;
|
|
71
39
|
continue;
|
|
72
40
|
}
|
|
@@ -99,19 +67,23 @@ class TestResultsService extends common_1.BaseService {
|
|
|
99
67
|
}
|
|
100
68
|
updateTestResult(testResultId, model) {
|
|
101
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
yield (0, utils_1.withHttpRetry)(() => this._client.
|
|
103
|
-
|
|
104
|
-
}), { label: `
|
|
70
|
+
yield (0, utils_1.withHttpRetry)(() => this._client.adaptersTestResultsIdPut(testResultId, {
|
|
71
|
+
testResultUpdateRequest: model,
|
|
72
|
+
}), { label: `adaptersTestResultsIdPut:${testResultId}` });
|
|
105
73
|
});
|
|
106
74
|
}
|
|
107
75
|
getTestResults(skip, model) {
|
|
108
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
77
|
return yield this._client
|
|
110
|
-
.
|
|
78
|
+
.adaptersTestResultsSearchPost({
|
|
79
|
+
skip: skip,
|
|
80
|
+
take: this._testsLimit,
|
|
81
|
+
testResultsFilterApiModel: model,
|
|
82
|
+
})
|
|
111
83
|
// @ts-ignore
|
|
112
84
|
.then((response) => {
|
|
113
|
-
const data = response.body || response;
|
|
114
|
-
return data;
|
|
85
|
+
const data = (response === null || response === void 0 ? void 0 : response.body) || response;
|
|
86
|
+
return (data !== null && data !== void 0 ? data : []);
|
|
115
87
|
})
|
|
116
88
|
// @ts-ignore
|
|
117
89
|
.catch((err) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface ITestResultsService {
|
|
2
2
|
getExternalIdsForRun(): Promise<string[]>;
|
|
3
3
|
findTestResultIdByExternalId(externalId: string): Promise<string | undefined>;
|
|
4
|
-
updateTestResult(testResultId: string, model:
|
|
4
|
+
updateTestResult(testResultId: string, model: any): Promise<void>;
|
|
5
5
|
}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { AutoTestResultsForTestRunModel, TestRunState, TestRunV2ApiResult } from "testit-api-client";
|
|
2
1
|
import { BaseConverter, AdapterConfig, Outcome } from "../../common";
|
|
3
2
|
import { AutotestResult, RunState, TestRunGet } from "./testruns.type";
|
|
4
3
|
export interface ITestRunConverter {
|
|
5
|
-
toOriginState(state: RunState):
|
|
6
|
-
toLocalState(state:
|
|
7
|
-
toLocalTestRun(testRun:
|
|
8
|
-
toOriginAutotestResult(autotest: AutotestResult):
|
|
9
|
-
toOriginAutotestResultInProgress(autotest: AutotestResult):
|
|
10
|
-
toOriginTestResultUpdate(autotest: AutotestResult):
|
|
4
|
+
toOriginState(state: RunState): any;
|
|
5
|
+
toLocalState(state: any): RunState;
|
|
6
|
+
toLocalTestRun(testRun: any): TestRunGet;
|
|
7
|
+
toOriginAutotestResult(autotest: AutotestResult): any;
|
|
8
|
+
toOriginAutotestResultInProgress(autotest: AutotestResult): any;
|
|
9
|
+
toOriginTestResultUpdate(autotest: AutotestResult): any;
|
|
11
10
|
}
|
|
12
11
|
export declare class TestRunConverter extends BaseConverter implements ITestRunConverter {
|
|
13
12
|
private autotestConverter;
|
|
14
13
|
constructor(config: AdapterConfig);
|
|
15
|
-
toLocalState(state:
|
|
16
|
-
toOriginState(state: RunState):
|
|
14
|
+
toLocalState(state: any): RunState;
|
|
15
|
+
toOriginState(state: RunState): any;
|
|
17
16
|
mapToStatusType(status: Outcome): string;
|
|
18
|
-
toOriginAutotestResultInProgress(autotest: AutotestResult):
|
|
19
|
-
toOriginAutotestResult(autotest: AutotestResult):
|
|
20
|
-
toOriginTestResultUpdate(autotest: AutotestResult):
|
|
21
|
-
toLocalTestRun(testRun:
|
|
17
|
+
toOriginAutotestResultInProgress(autotest: AutotestResult): any;
|
|
18
|
+
toOriginAutotestResult(autotest: AutotestResult): any;
|
|
19
|
+
toOriginTestResultUpdate(autotest: AutotestResult): any;
|
|
20
|
+
toLocalTestRun(testRun: any): TestRunGet;
|
|
22
21
|
}
|