testit-js-commons 5.1.1 → 5.1.2-TMS-6.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 +5 -6
- package/lib/adapters-api/dist/api/AttachmentsApi.js +5 -5
- package/lib/adapters-api/dist/api/AutoTestsApi.js +10 -118
- package/lib/adapters-api/dist/api/ConfigurationsApi.js +1 -1
- package/lib/adapters-api/dist/api/CustomAttributesApi.js +4 -4
- package/lib/adapters-api/dist/api/ParametersApi.js +3 -3
- package/lib/adapters-api/dist/api/ProjectAttributesApi.js +2 -2
- package/lib/adapters-api/dist/api/ProjectSectionsApi.js +1 -1
- package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +1 -1
- package/lib/adapters-api/dist/api/ProjectsApi.js +4 -4
- package/lib/adapters-api/dist/api/SectionsApi.js +2 -2
- package/lib/adapters-api/dist/api/TestResultsApi.js +3 -3
- package/lib/adapters-api/dist/api/TestRunsApi.js +8 -8
- package/lib/adapters-api/dist/api/WorkItemsApi.js +3 -3
- package/lib/adapters-api/dist/api/WorkflowsApi.js +1 -1
- package/lib/adapters-api/dist/index.js +7 -0
- package/lib/adapters-api/dist/model/AutoTestCaseModel.js +85 -0
- package/lib/adapters-api/dist/model/AutoTestFilterApiModel.js +27 -0
- package/lib/adapters-api/dist/model/AutoTestModel.js +15 -0
- package/lib/adapters-api/dist/model/AutoTestUpdateApiModel.js +4 -6
- package/lib/adapters-api/dist/model/CreateWorkItemApiModel.js +22 -0
- package/lib/adapters-api/dist/model/CustomAttributeType.js +6 -0
- package/lib/adapters-api/dist/model/CustomAttributeTypesEnum.js +6 -0
- package/lib/adapters-api/dist/model/WorkItemApiResult.js +28 -4
- package/lib/adapters-api/dist/model/WorkItemEntityTypeApiModel.js +6 -0
- package/lib/adapters-api/dist/model/WorkItemFilterApiModel.js +40 -0
- package/lib/adapters-api/dist/model/WorkItemTypeModel.js +6 -0
- package/lib/adapters-api/index.d.ts +85 -96
- package/lib/common/base.service.js +4 -1
- package/lib/common/utils/utils.d.ts +2 -0
- package/lib/common/utils/utils.js +6 -1
- package/lib/common/utils/utils.test.d.ts +1 -0
- package/lib/common/utils/utils.test.js +17 -0
- package/lib/services/autotests/autotests.converter.js +2 -1
- package/lib/services/autotests/autotests.converter.test.js +13 -0
- package/lib/services/syncstorage/syncstorage.runner.js +1 -1
- package/package.json +1 -1
|
@@ -69,7 +69,7 @@ declare module 'adapters-api/api/AttachmentsApi' {
|
|
|
69
69
|
}): Promise<any>;
|
|
70
70
|
/**
|
|
71
71
|
* Upload new attachment file
|
|
72
|
-
* File size is restricted to
|
|
72
|
+
* File size is restricted to 1 GB (1 073 741 824 bytes)
|
|
73
73
|
* @param {Object} opts Optional parameters
|
|
74
74
|
* @param {File} [file]
|
|
75
75
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AttachmentModel} and HTTP response
|
|
@@ -77,7 +77,7 @@ declare module 'adapters-api/api/AttachmentsApi' {
|
|
|
77
77
|
adaptersAttachmentsPostWithHttpInfo(opts: Object): Promise<any>;
|
|
78
78
|
/**
|
|
79
79
|
* Upload new attachment file
|
|
80
|
-
* File size is restricted to
|
|
80
|
+
* File size is restricted to 1 GB (1 073 741 824 bytes)
|
|
81
81
|
* @param {Object} opts Optional parameters
|
|
82
82
|
* @param {File} opts.file
|
|
83
83
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AttachmentModel}
|
|
@@ -144,95 +144,6 @@ declare module 'adapters-api/api/AutoTestsApi' {
|
|
|
144
144
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
145
145
|
*/
|
|
146
146
|
adaptersAutoTestsBulkPut(opts: Object): Promise<any>;
|
|
147
|
-
/**
|
|
148
|
-
* @param {Object} opts Optional parameters
|
|
149
|
-
* @param {String} [projectId] Project internal ID
|
|
150
|
-
* @param {String} [externalId] Autotest external ID
|
|
151
|
-
* @param {Number} [globalId] Autotest global ID
|
|
152
|
-
* @param {String} [namespace] Namespace in which autotest is located
|
|
153
|
-
* @param {Boolean} [isNamespaceNull] OBSOLETE: Use `includeEmptyNamespaces` instead
|
|
154
|
-
* @param {Boolean} [includeEmptyNamespaces] If result must contain autotests without namespace
|
|
155
|
-
* @param {String} [className] Name of class in which autotest is located
|
|
156
|
-
* @param {Boolean} [isClassnameNull] OBSOLETE: Use `includeEmptyClassNames` instead
|
|
157
|
-
* @param {Boolean} [includeEmptyClassNames] If result must contain autotests without class
|
|
158
|
-
* @param {Boolean} [isDeleted] OBSOLETE: Use `deleted` instead
|
|
159
|
-
* @param {Boolean} [deleted] Is autotest deleted
|
|
160
|
-
* @param {Array.<String>} [labels] Include only autotests with provided labels
|
|
161
|
-
* @param {Number} [stabilityMinimal] OBSOLETE: Use `minStability` instead
|
|
162
|
-
* @param {Number} [minStability] Minimum stability value of autotest
|
|
163
|
-
* @param {Number} [stabilityMaximal] OBSOLETE: Use `maxStability` instead
|
|
164
|
-
* @param {Number} [maxStability] Maximum stability value of autotest
|
|
165
|
-
* @param {Boolean} [isFlaky] OBSOLETE: Use `flaky` instead
|
|
166
|
-
* @param {Boolean} [flaky] Is autotest marked as \"Flaky\"
|
|
167
|
-
* @param {Boolean} [includeSteps] If result must also include autotest steps
|
|
168
|
-
* @param {Boolean} [includeLabels] If result must also include autotest labels
|
|
169
|
-
* @param {String} [externalKey] External key of autotest
|
|
170
|
-
* @param {Number} [skip] Amount of items to be skipped (offset)
|
|
171
|
-
* @param {Number} [take] Amount of items to be taken (limit)
|
|
172
|
-
* @param {String} [orderBy] SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC)
|
|
173
|
-
* @param {String} [searchField] Property name for searching
|
|
174
|
-
* @param {String} [searchValue] Value for searching
|
|
175
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/AutoTestModel>} and HTTP response
|
|
176
|
-
*/
|
|
177
|
-
adaptersAutoTestsGetWithHttpInfo(opts: Object): Promise<any>;
|
|
178
|
-
/**
|
|
179
|
-
* @param {Object} opts Optional parameters
|
|
180
|
-
* @param {String} opts.projectId Project internal ID
|
|
181
|
-
* @param {String} opts.externalId Autotest external ID
|
|
182
|
-
* @param {Number} opts.globalId Autotest global ID
|
|
183
|
-
* @param {String} opts.namespace Namespace in which autotest is located
|
|
184
|
-
* @param {Boolean} opts.isNamespaceNull OBSOLETE: Use `includeEmptyNamespaces` instead
|
|
185
|
-
* @param {Boolean} opts.includeEmptyNamespaces If result must contain autotests without namespace
|
|
186
|
-
* @param {String} opts.className Name of class in which autotest is located
|
|
187
|
-
* @param {Boolean} opts.isClassnameNull OBSOLETE: Use `includeEmptyClassNames` instead
|
|
188
|
-
* @param {Boolean} opts.includeEmptyClassNames If result must contain autotests without class
|
|
189
|
-
* @param {Boolean} opts.isDeleted OBSOLETE: Use `deleted` instead
|
|
190
|
-
* @param {Boolean} opts.deleted Is autotest deleted
|
|
191
|
-
* @param {Array.<String>} opts.labels Include only autotests with provided labels
|
|
192
|
-
* @param {Number} opts.stabilityMinimal OBSOLETE: Use `minStability` instead
|
|
193
|
-
* @param {Number} opts.minStability Minimum stability value of autotest
|
|
194
|
-
* @param {Number} opts.stabilityMaximal OBSOLETE: Use `maxStability` instead
|
|
195
|
-
* @param {Number} opts.maxStability Maximum stability value of autotest
|
|
196
|
-
* @param {Boolean} opts.isFlaky OBSOLETE: Use `flaky` instead
|
|
197
|
-
* @param {Boolean} opts.flaky Is autotest marked as \"Flaky\"
|
|
198
|
-
* @param {Boolean} opts.includeSteps If result must also include autotest steps
|
|
199
|
-
* @param {Boolean} opts.includeLabels If result must also include autotest labels
|
|
200
|
-
* @param {String} opts.externalKey External key of autotest
|
|
201
|
-
* @param {Number} opts.skip Amount of items to be skipped (offset)
|
|
202
|
-
* @param {Number} opts.take Amount of items to be taken (limit)
|
|
203
|
-
* @param {String} opts.orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC)
|
|
204
|
-
* @param {String} opts.searchField Property name for searching
|
|
205
|
-
* @param {String} opts.searchValue Value for searching
|
|
206
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/AutoTestModel>}
|
|
207
|
-
*/
|
|
208
|
-
adaptersAutoTestsGet(opts: {
|
|
209
|
-
projectId: string;
|
|
210
|
-
externalId: string;
|
|
211
|
-
globalId: number;
|
|
212
|
-
namespace: string;
|
|
213
|
-
isNamespaceNull: boolean;
|
|
214
|
-
includeEmptyNamespaces: boolean;
|
|
215
|
-
className: string;
|
|
216
|
-
isClassnameNull: boolean;
|
|
217
|
-
includeEmptyClassNames: boolean;
|
|
218
|
-
isDeleted: boolean;
|
|
219
|
-
deleted: boolean;
|
|
220
|
-
labels: Array<string>;
|
|
221
|
-
stabilityMinimal: number;
|
|
222
|
-
minStability: number;
|
|
223
|
-
stabilityMaximal: number;
|
|
224
|
-
maxStability: number;
|
|
225
|
-
isFlaky: boolean;
|
|
226
|
-
flaky: boolean;
|
|
227
|
-
includeSteps: boolean;
|
|
228
|
-
includeLabels: boolean;
|
|
229
|
-
externalKey: string;
|
|
230
|
-
skip: number;
|
|
231
|
-
take: number;
|
|
232
|
-
orderBy: string;
|
|
233
|
-
searchField: string;
|
|
234
|
-
searchValue: string;
|
|
235
|
-
}): Promise<any>;
|
|
236
147
|
/**
|
|
237
148
|
* Get autotest by internal or global ID
|
|
238
149
|
* @param {String} id Internal (UUID) or global (integer) identifier
|
|
@@ -1628,6 +1539,7 @@ declare module 'adapters-api/index' {
|
|
|
1628
1539
|
import AutoTest from 'adapters-api/model/AutoTest';
|
|
1629
1540
|
import AutoTestApiResult from 'adapters-api/model/AutoTestApiResult';
|
|
1630
1541
|
import AutoTestCaseApiModel from 'adapters-api/model/AutoTestCaseApiModel';
|
|
1542
|
+
import AutoTestCaseModel from 'adapters-api/model/AutoTestCaseModel';
|
|
1631
1543
|
import AutoTestCreateApiModel from 'adapters-api/model/AutoTestCreateApiModel';
|
|
1632
1544
|
import AutoTestFilterApiModel from 'adapters-api/model/AutoTestFilterApiModel';
|
|
1633
1545
|
import AutoTestIdModel from 'adapters-api/model/AutoTestIdModel';
|
|
@@ -1854,6 +1766,11 @@ declare module 'adapters-api/index' {
|
|
|
1854
1766
|
* @property {module:model/AutoTestCaseApiModel}
|
|
1855
1767
|
*/
|
|
1856
1768
|
AutoTestCaseApiModel,
|
|
1769
|
+
/**
|
|
1770
|
+
* The AutoTestCaseModel model constructor.
|
|
1771
|
+
* @property {module:model/AutoTestCaseModel}
|
|
1772
|
+
*/
|
|
1773
|
+
AutoTestCaseModel,
|
|
1857
1774
|
/**
|
|
1858
1775
|
* The AutoTestCreateApiModel model constructor.
|
|
1859
1776
|
* @property {module:model/AutoTestCreateApiModel}
|
|
@@ -3112,6 +3029,58 @@ declare module 'adapters-api/model/AutoTestCaseApiModel' {
|
|
|
3112
3029
|
}
|
|
3113
3030
|
export default AutoTestCaseApiModel;
|
|
3114
3031
|
|
|
3032
|
+
}
|
|
3033
|
+
declare module 'adapters-api/model/AutoTestCaseModel' {
|
|
3034
|
+
/**
|
|
3035
|
+
* API
|
|
3036
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
3037
|
+
*
|
|
3038
|
+
* The version of the OpenAPI document: adapters
|
|
3039
|
+
*
|
|
3040
|
+
*
|
|
3041
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
3042
|
+
* https://openapi-generator.tech
|
|
3043
|
+
* Do not edit the class manually.
|
|
3044
|
+
*
|
|
3045
|
+
*/
|
|
3046
|
+
/**
|
|
3047
|
+
* The AutoTestCaseModel model module.
|
|
3048
|
+
* @module model/AutoTestCaseModel
|
|
3049
|
+
* @version 1.0.0
|
|
3050
|
+
*/
|
|
3051
|
+
class AutoTestCaseModel {
|
|
3052
|
+
/**
|
|
3053
|
+
* Constructs a new <code>AutoTestCaseModel</code>.
|
|
3054
|
+
* @alias module:model/AutoTestCaseModel
|
|
3055
|
+
* @param globalId {Number} Global ID of the auto test case
|
|
3056
|
+
*/
|
|
3057
|
+
constructor(globalId: number);
|
|
3058
|
+
/**
|
|
3059
|
+
* Initializes the fields of this object.
|
|
3060
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
3061
|
+
* Only for internal use.
|
|
3062
|
+
*/
|
|
3063
|
+
static initialize(obj: any, globalId: any): void;
|
|
3064
|
+
/**
|
|
3065
|
+
* Constructs a <code>AutoTestCaseModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
3066
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
3067
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
3068
|
+
* @param {module:model/AutoTestCaseModel} obj Optional instance to populate.
|
|
3069
|
+
* @return {module:model/AutoTestCaseModel} The populated <code>AutoTestCaseModel</code> instance.
|
|
3070
|
+
*/
|
|
3071
|
+
static constructFromObject(data: Object, obj: module): module;
|
|
3072
|
+
/**
|
|
3073
|
+
* Validates the JSON data with respect to <code>AutoTestCaseModel</code>.
|
|
3074
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
3075
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AutoTestCaseModel</code>.
|
|
3076
|
+
*/
|
|
3077
|
+
static validateJSON(data: Object): boolean;
|
|
3078
|
+
}
|
|
3079
|
+
namespace AutoTestCaseModel {
|
|
3080
|
+
var RequiredProperties: string[];
|
|
3081
|
+
}
|
|
3082
|
+
export default AutoTestCaseModel;
|
|
3083
|
+
|
|
3115
3084
|
}
|
|
3116
3085
|
declare module 'adapters-api/model/AutoTestCreateApiModel' {
|
|
3117
3086
|
/**
|
|
@@ -3858,15 +3827,14 @@ declare module 'adapters-api/model/AutoTestUpdateApiModel' {
|
|
|
3858
3827
|
* @param projectId {String} Unique ID of the autotest project
|
|
3859
3828
|
* @param externalId {String} External ID of the autotest
|
|
3860
3829
|
* @param name {String} Name of the autotest
|
|
3861
|
-
* @param resetLayer {Boolean} Indicates if the autotest layer should be reset.
|
|
3862
3830
|
*/
|
|
3863
|
-
constructor(projectId: string, externalId: string, name: string
|
|
3831
|
+
constructor(projectId: string, externalId: string, name: string);
|
|
3864
3832
|
/**
|
|
3865
3833
|
* Initializes the fields of this object.
|
|
3866
3834
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
3867
3835
|
* Only for internal use.
|
|
3868
3836
|
*/
|
|
3869
|
-
static initialize(obj: any, projectId: any, externalId: any, name: any
|
|
3837
|
+
static initialize(obj: any, projectId: any, externalId: any, name: any): void;
|
|
3870
3838
|
/**
|
|
3871
3839
|
* Constructs a <code>AutoTestUpdateApiModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
3872
3840
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
@@ -5025,6 +4993,11 @@ declare module 'adapters-api/model/CustomAttributeType' {
|
|
|
5025
4993
|
* @const
|
|
5026
4994
|
*/
|
|
5027
4995
|
"checkbox": string;
|
|
4996
|
+
/**
|
|
4997
|
+
* value: "numeric"
|
|
4998
|
+
* @const
|
|
4999
|
+
*/
|
|
5000
|
+
"numeric": string;
|
|
5028
5001
|
/**
|
|
5029
5002
|
* Returns a <code>CustomAttributeType</code> enum value from a Javascript object name.
|
|
5030
5003
|
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
@@ -5083,6 +5056,11 @@ declare module 'adapters-api/model/CustomAttributeTypesEnum' {
|
|
|
5083
5056
|
* @const
|
|
5084
5057
|
*/
|
|
5085
5058
|
"checkbox": string;
|
|
5059
|
+
/**
|
|
5060
|
+
* value: "numeric"
|
|
5061
|
+
* @const
|
|
5062
|
+
*/
|
|
5063
|
+
"numeric": string;
|
|
5086
5064
|
/**
|
|
5087
5065
|
* Returns a <code>CustomAttributeTypesEnum</code> enum value from a Javascript object name.
|
|
5088
5066
|
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
@@ -8739,18 +8717,19 @@ declare module 'adapters-api/model/WorkItemApiResult' {
|
|
|
8739
8717
|
* @param postconditionSteps {Array.<module:model/StepModel>} Set of postcondition steps that are executed after completing the main steps
|
|
8740
8718
|
* @param iterations {Array.<module:model/IterationModel>} Associated iterations linked to the work item
|
|
8741
8719
|
* @param autoTests {Array.<module:model/AutoTestModel>} Automated tests associated with the work item
|
|
8720
|
+
* @param autoTestCases {Array.<module:model/AutoTestCaseApiModel>} Set of automated test cases linked to the work item
|
|
8742
8721
|
* @param attachments {Array.<module:model/AttachmentModel>} Files attached to the work item
|
|
8743
8722
|
* @param links {Array.<module:model/LinkModel>} Set of links related to the work item
|
|
8744
8723
|
* @param parameters {Array.<module:model/WorkItemParameterKeyApiResult>} Set of parameters related to the work item
|
|
8745
8724
|
* @param isDeleted {Boolean} Indicates whether the work item is marked as deleted
|
|
8746
8725
|
*/
|
|
8747
|
-
constructor(id: string, globalId: number, projectId: string, sectionId: string, name: string, entityTypeName: module, duration: number, state: module, priority: module, isAutomated: boolean, attributes: Record<string, Object>, tags: Array<any>, sectionPreconditionSteps: Array<any>, sectionPostconditionSteps: Array<any>, preconditionSteps: Array<any>, steps: Array<any>, postconditionSteps: Array<any>, iterations: Array<any>, autoTests: Array<any>, attachments: Array<any>, links: Array<any>, parameters: Array<any>, isDeleted: boolean);
|
|
8726
|
+
constructor(id: string, globalId: number, projectId: string, sectionId: string, name: string, entityTypeName: module, duration: number, state: module, priority: module, isAutomated: boolean, attributes: Record<string, Object>, tags: Array<any>, sectionPreconditionSteps: Array<any>, sectionPostconditionSteps: Array<any>, preconditionSteps: Array<any>, steps: Array<any>, postconditionSteps: Array<any>, iterations: Array<any>, autoTests: Array<any>, autoTestCases: Array<any>, attachments: Array<any>, links: Array<any>, parameters: Array<any>, isDeleted: boolean);
|
|
8748
8727
|
/**
|
|
8749
8728
|
* Initializes the fields of this object.
|
|
8750
8729
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
8751
8730
|
* Only for internal use.
|
|
8752
8731
|
*/
|
|
8753
|
-
static initialize(obj: any, id: any, globalId: any, projectId: any, sectionId: any, name: any, entityTypeName: any, duration: any, state: any, priority: any, isAutomated: any, attributes: any, tags: any, sectionPreconditionSteps: any, sectionPostconditionSteps: any, preconditionSteps: any, steps: any, postconditionSteps: any, iterations: any, autoTests: any, attachments: any, links: any, parameters: any, isDeleted: any): void;
|
|
8732
|
+
static initialize(obj: any, id: any, globalId: any, projectId: any, sectionId: any, name: any, entityTypeName: any, duration: any, state: any, priority: any, isAutomated: any, attributes: any, tags: any, sectionPreconditionSteps: any, sectionPostconditionSteps: any, preconditionSteps: any, steps: any, postconditionSteps: any, iterations: any, autoTests: any, autoTestCases: any, attachments: any, links: any, parameters: any, isDeleted: any): void;
|
|
8754
8733
|
/**
|
|
8755
8734
|
* Constructs a <code>WorkItemApiResult</code> from a plain JavaScript object, optionally creating a new instance.
|
|
8756
8735
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
@@ -8806,6 +8785,11 @@ declare module 'adapters-api/model/WorkItemEntityTypeApiModel' {
|
|
|
8806
8785
|
* @const
|
|
8807
8786
|
*/
|
|
8808
8787
|
"SharedSteps": string;
|
|
8788
|
+
/**
|
|
8789
|
+
* value: "AutoTestCases"
|
|
8790
|
+
* @const
|
|
8791
|
+
*/
|
|
8792
|
+
"AutoTestCases": string;
|
|
8809
8793
|
/**
|
|
8810
8794
|
* Returns a <code>WorkItemEntityTypeApiModel</code> enum value from a Javascript object name.
|
|
8811
8795
|
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
@@ -9401,6 +9385,11 @@ declare module 'adapters-api/model/WorkItemTypeModel' {
|
|
|
9401
9385
|
* @const
|
|
9402
9386
|
*/
|
|
9403
9387
|
"SharedSteps": string;
|
|
9388
|
+
/**
|
|
9389
|
+
* value: "AutoTestCases"
|
|
9390
|
+
* @const
|
|
9391
|
+
*/
|
|
9392
|
+
"AutoTestCases": string;
|
|
9404
9393
|
/**
|
|
9405
9394
|
* Returns a <code>WorkItemTypeModel</code> enum value from a Javascript object name.
|
|
9406
9395
|
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
@@ -19,8 +19,11 @@ class BaseService {
|
|
|
19
19
|
throw new Error("Project id is not defined");
|
|
20
20
|
const defaultClient = AdaptersApi.ApiClient.instance;
|
|
21
21
|
defaultClient.basePath = config.url;
|
|
22
|
-
// @ts-ignore
|
|
22
|
+
// @ts-ignore — generated ApiClient must keep scheme name "PrivateToken" (regen often renames it)
|
|
23
23
|
const auth = defaultClient.authentications["PrivateToken"];
|
|
24
|
+
if (!auth) {
|
|
25
|
+
throw new Error(`adapters-api auth must expose "PrivateToken", got: [${Object.keys(defaultClient.authentications).join(", ")}]`);
|
|
26
|
+
}
|
|
24
27
|
auth.apiKeyPrefix = "PrivateToken";
|
|
25
28
|
auth.apiKey = config.privateToken;
|
|
26
29
|
if (config.certValidation === false) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
export declare namespace Utils {
|
|
3
3
|
function getHash(input: string): string;
|
|
4
|
+
/** Normalize path separators to `/` so namespaces match across Windows and Unix. */
|
|
5
|
+
function toPosixPath(file: string): string;
|
|
4
6
|
function getDir(file: string): string;
|
|
5
7
|
function removeDir(path: string): void;
|
|
6
8
|
function getFileName(file: string): string;
|
|
@@ -44,8 +44,13 @@ var Utils;
|
|
|
44
44
|
return (0, crypto_1.createHash)("md5").update(input).digest("hex");
|
|
45
45
|
}
|
|
46
46
|
Utils.getHash = getHash;
|
|
47
|
+
/** Normalize path separators to `/` so namespaces match across Windows and Unix. */
|
|
48
|
+
function toPosixPath(file) {
|
|
49
|
+
return file.replace(/\\/g, "/");
|
|
50
|
+
}
|
|
51
|
+
Utils.toPosixPath = toPosixPath;
|
|
47
52
|
function getDir(file) {
|
|
48
|
-
return
|
|
53
|
+
return path_1.posix.dirname(toPosixPath(file));
|
|
49
54
|
}
|
|
50
55
|
Utils.getDir = getDir;
|
|
51
56
|
function removeDir(path) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("./utils");
|
|
4
|
+
describe("Utils.toPosixPath", () => {
|
|
5
|
+
it("replaces backslashes with forward slashes", () => {
|
|
6
|
+
expect(utils_1.Utils.toPosixPath("api\\users\\v1")).toBe("api/users/v1");
|
|
7
|
+
});
|
|
8
|
+
it("keeps forward slashes", () => {
|
|
9
|
+
expect(utils_1.Utils.toPosixPath("api/users/v1")).toBe("api/users/v1");
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
describe("Utils.getDir", () => {
|
|
13
|
+
it("returns directory with posix separators", () => {
|
|
14
|
+
expect(utils_1.Utils.getDir("api\\users\\test.spec.ts")).toBe("api/users");
|
|
15
|
+
expect(utils_1.Utils.getDir("api/users/test.spec.ts")).toBe("api/users");
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -41,10 +41,11 @@ class AutotestConverter extends common_1.BaseConverter {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
baseAutotestFields(autotest) {
|
|
44
|
+
var _a;
|
|
44
45
|
return {
|
|
45
46
|
externalId: autotest.externalId,
|
|
46
47
|
name: autotest.name,
|
|
47
|
-
namespace: autotest.namespace,
|
|
48
|
+
namespace: (_a = autotest.namespace) === null || _a === void 0 ? void 0 : _a.replace(/\\/g, "/"),
|
|
48
49
|
classname: autotest.classname,
|
|
49
50
|
steps: autotest.steps,
|
|
50
51
|
setup: autotest.setup,
|
|
@@ -37,3 +37,16 @@ describe("AutotestConverter layer", () => {
|
|
|
37
37
|
expect(withoutLayer.layer).toBeUndefined();
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
|
+
describe("AutotestConverter namespace", () => {
|
|
41
|
+
const converter = new autotests_converter_1.AutotestConverter(makeConfig());
|
|
42
|
+
it("normalizes backslashes to forward slashes on create/update", () => {
|
|
43
|
+
const create = converter.toOriginAutotestCreate(makeAutotest({ namespace: "api\\users" }));
|
|
44
|
+
expect(create.namespace).toBe("api/users");
|
|
45
|
+
const update = converter.toOriginAutotestUpdate(makeAutotest({ namespace: "api\\users\\v1" }));
|
|
46
|
+
expect(update.namespace).toBe("api/users/v1");
|
|
47
|
+
});
|
|
48
|
+
it("keeps posix namespace unchanged", () => {
|
|
49
|
+
const model = converter.toOriginAutotestCreate(makeAutotest({ namespace: "api/users" }));
|
|
50
|
+
expect(model.namespace).toBe("api/users");
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -354,7 +354,7 @@ class SyncStorageRunner {
|
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
exports.SyncStorageRunner = SyncStorageRunner;
|
|
357
|
-
SyncStorageRunner.VERSION = "v0.3.12";
|
|
357
|
+
SyncStorageRunner.VERSION = "v0.3.12-tms-5.8";
|
|
358
358
|
SyncStorageRunner.STARTUP_TIMEOUT_MS = 30000;
|
|
359
359
|
SyncStorageRunner.STARTUP_POLL_MS = 1000;
|
|
360
360
|
SyncStorageRunner.PROCESS_WARMUP_MS = 2000;
|