@uipath/test-manager-tool 1.199.0-preview.99 → 1.199.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/dist/tool.js +589 -85
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -30309,7 +30309,7 @@ var require_lib3 = __commonJS((exports, module) => {
|
|
|
30309
30309
|
var package_default = {
|
|
30310
30310
|
name: "@uipath/test-manager-tool",
|
|
30311
30311
|
license: "MIT",
|
|
30312
|
-
version: "1.199.0
|
|
30312
|
+
version: "1.199.0",
|
|
30313
30313
|
description: "Manage test cases, test sets, executions, and results.",
|
|
30314
30314
|
private: false,
|
|
30315
30315
|
repository: {
|
|
@@ -33644,7 +33644,7 @@ function requireOmap() {
|
|
|
33644
33644
|
function resolveYamlOmap(data) {
|
|
33645
33645
|
if (data === null)
|
|
33646
33646
|
return true;
|
|
33647
|
-
const objectKeys =
|
|
33647
|
+
const objectKeys = {};
|
|
33648
33648
|
const object = data;
|
|
33649
33649
|
for (let index = 0, length = object.length;index < length; index += 1) {
|
|
33650
33650
|
const pair = object[index];
|
|
@@ -33662,10 +33662,9 @@ function requireOmap() {
|
|
|
33662
33662
|
}
|
|
33663
33663
|
if (!pairHasKey)
|
|
33664
33664
|
return false;
|
|
33665
|
-
if (
|
|
33666
|
-
objectKeys.push(pairKey);
|
|
33667
|
-
else
|
|
33665
|
+
if (_hasOwnProperty.call(objectKeys, pairKey))
|
|
33668
33666
|
return false;
|
|
33667
|
+
Object.defineProperty(objectKeys, pairKey, { value: true });
|
|
33669
33668
|
}
|
|
33670
33669
|
return true;
|
|
33671
33670
|
}
|
|
@@ -36547,8 +36546,18 @@ function getInboundTraceContext() {
|
|
|
36547
36546
|
|
|
36548
36547
|
// ../common/src/telemetry/session-id.ts
|
|
36549
36548
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
36550
|
-
var
|
|
36551
|
-
var
|
|
36549
|
+
var SESSION_ID_MAX_LENGTH = 64;
|
|
36550
|
+
var RANDOM_SESSION_ID_LENGTH = 32;
|
|
36551
|
+
var TELEMETRY_SESSION_SOURCE_PROPERTY = "session_id_source";
|
|
36552
|
+
var CONTROL_CHARACTERS = /\p{Cc}/gu;
|
|
36553
|
+
var INHERITED_SESSION_SOURCES = [
|
|
36554
|
+
{ envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
|
|
36555
|
+
{ envVar: "CODEX_THREAD_ID", source: "codex" },
|
|
36556
|
+
{ envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
|
|
36557
|
+
{ envVar: "TERM_SESSION_ID", source: "terminal" },
|
|
36558
|
+
{ envVar: "WT_SESSION", source: "terminal" }
|
|
36559
|
+
];
|
|
36560
|
+
var telemetrySessionSlot = singleton("TelemetrySession");
|
|
36552
36561
|
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
36553
36562
|
function getProcessEnv2() {
|
|
36554
36563
|
return globalThis.process?.env;
|
|
@@ -36557,14 +36566,42 @@ function normalizeSessionId(value) {
|
|
|
36557
36566
|
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
36558
36567
|
return;
|
|
36559
36568
|
}
|
|
36560
|
-
const
|
|
36561
|
-
return
|
|
36569
|
+
const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
|
|
36570
|
+
return cleaned || undefined;
|
|
36562
36571
|
}
|
|
36563
36572
|
function getConfiguredTelemetrySessionId() {
|
|
36564
36573
|
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
36565
36574
|
}
|
|
36566
|
-
function
|
|
36567
|
-
|
|
36575
|
+
function getInheritedSession(env) {
|
|
36576
|
+
for (const candidate of INHERITED_SESSION_SOURCES) {
|
|
36577
|
+
const handle = normalizeSessionId(env[candidate.envVar]);
|
|
36578
|
+
if (handle) {
|
|
36579
|
+
return { id: handle, source: candidate.source };
|
|
36580
|
+
}
|
|
36581
|
+
}
|
|
36582
|
+
return;
|
|
36583
|
+
}
|
|
36584
|
+
function generateRandomSession() {
|
|
36585
|
+
const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
|
|
36586
|
+
crypto.getRandomValues(bytes);
|
|
36587
|
+
let hex = "";
|
|
36588
|
+
for (const byte of bytes) {
|
|
36589
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
36590
|
+
}
|
|
36591
|
+
return { id: hex, source: "random" };
|
|
36592
|
+
}
|
|
36593
|
+
function resolveTelemetrySession() {
|
|
36594
|
+
const existing = telemetrySessionSlot.get();
|
|
36595
|
+
if (existing) {
|
|
36596
|
+
return existing;
|
|
36597
|
+
}
|
|
36598
|
+
const declaredHandle = getConfiguredTelemetrySessionId();
|
|
36599
|
+
const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
|
|
36600
|
+
telemetrySessionSlot.set(resolved);
|
|
36601
|
+
return resolved;
|
|
36602
|
+
}
|
|
36603
|
+
function getTelemetrySessionSource() {
|
|
36604
|
+
return resolveTelemetrySession().source;
|
|
36568
36605
|
}
|
|
36569
36606
|
function getTelemetryOperationId() {
|
|
36570
36607
|
const existing = telemetryOperationIdSlot.get();
|
|
@@ -36841,24 +36878,18 @@ class TelemetryService {
|
|
|
36841
36878
|
}
|
|
36842
36879
|
enrichPropertiesWithContext(properties, context) {
|
|
36843
36880
|
const globalProperties = getGlobalTelemetryProperties();
|
|
36844
|
-
const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
|
|
36845
|
-
const sessionId = resolveTelemetrySessionId(existingSessionId);
|
|
36846
36881
|
const enriched = {
|
|
36847
36882
|
...getExecutionContextTelemetryProperties(),
|
|
36848
36883
|
...globalProperties,
|
|
36849
36884
|
...this.defaultProperties,
|
|
36850
36885
|
...redactProperties(properties ?? {}),
|
|
36886
|
+
[TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
|
|
36851
36887
|
...context ? {
|
|
36852
36888
|
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
36853
36889
|
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
36854
36890
|
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
36855
36891
|
} : {}
|
|
36856
36892
|
};
|
|
36857
|
-
if (sessionId === undefined) {
|
|
36858
|
-
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
36859
|
-
} else {
|
|
36860
|
-
enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
|
|
36861
|
-
}
|
|
36862
36893
|
return enriched;
|
|
36863
36894
|
}
|
|
36864
36895
|
generateId() {
|
|
@@ -39287,38 +39318,6 @@ function UiPathTestManagementHubCommonEnumsRobotTypeToJSON(value) {
|
|
|
39287
39318
|
return value;
|
|
39288
39319
|
}
|
|
39289
39320
|
|
|
39290
|
-
// ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceState.ts
|
|
39291
|
-
function UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSON(json2) {
|
|
39292
|
-
return UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSONTyped(json2, false);
|
|
39293
|
-
}
|
|
39294
|
-
function UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSONTyped(json2, ignoreDiscriminator) {
|
|
39295
|
-
return json2;
|
|
39296
|
-
}
|
|
39297
|
-
|
|
39298
|
-
// ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsObjectGovernanceDto.ts
|
|
39299
|
-
function UiPathTestManagementHubTestManagementAbstractionsDTOsObjectGovernanceDtoFromJSON(json2) {
|
|
39300
|
-
return UiPathTestManagementHubTestManagementAbstractionsDTOsObjectGovernanceDtoFromJSONTyped(json2, false);
|
|
39301
|
-
}
|
|
39302
|
-
function UiPathTestManagementHubTestManagementAbstractionsDTOsObjectGovernanceDtoFromJSONTyped(json2, ignoreDiscriminator) {
|
|
39303
|
-
if (json2 == null) {
|
|
39304
|
-
return json2;
|
|
39305
|
-
}
|
|
39306
|
-
return {
|
|
39307
|
-
id: json2["id"] == null ? undefined : json2["id"],
|
|
39308
|
-
objectId: json2["objectId"] == null ? undefined : json2["objectId"],
|
|
39309
|
-
objectType: json2["objectType"] == null ? undefined : UiPathTestManagementHubCommonEnumsObjectTypeFromJSON(json2["objectType"]),
|
|
39310
|
-
tenantId: json2["tenantId"] == null ? undefined : json2["tenantId"],
|
|
39311
|
-
projectId: json2["projectId"] == null ? undefined : json2["projectId"],
|
|
39312
|
-
state: json2["state"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSON(json2["state"]),
|
|
39313
|
-
created: json2["created"] == null ? undefined : new Date(json2["created"]),
|
|
39314
|
-
updated: json2["updated"] == null ? undefined : new Date(json2["updated"]),
|
|
39315
|
-
totalSignaturesRequired: json2["totalSignaturesRequired"] == null ? undefined : json2["totalSignaturesRequired"],
|
|
39316
|
-
totalSignaturesReceived: json2["totalSignaturesReceived"] == null ? undefined : json2["totalSignaturesReceived"],
|
|
39317
|
-
allowedExplicitNextStates: json2["allowedExplicitNextStates"] == null ? undefined : json2["allowedExplicitNextStates"].map(UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSON),
|
|
39318
|
-
isLocked: json2["isLocked"] == null ? undefined : json2["isLocked"]
|
|
39319
|
-
};
|
|
39320
|
-
}
|
|
39321
|
-
|
|
39322
39321
|
// ../test-manager-sdk/generated/src/models/UiPathTestManagementHubCommonEnumsExecutionType.ts
|
|
39323
39322
|
var UiPathTestManagementHubCommonEnumsExecutionType = {
|
|
39324
39323
|
Manual: "manual",
|
|
@@ -39336,6 +39335,14 @@ function UiPathTestManagementHubCommonEnumsExecutionTypeToJSON(value) {
|
|
|
39336
39335
|
return value;
|
|
39337
39336
|
}
|
|
39338
39337
|
|
|
39338
|
+
// ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceState.ts
|
|
39339
|
+
function UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSON(json2) {
|
|
39340
|
+
return UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSONTyped(json2, false);
|
|
39341
|
+
}
|
|
39342
|
+
function UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSONTyped(json2, ignoreDiscriminator) {
|
|
39343
|
+
return json2;
|
|
39344
|
+
}
|
|
39345
|
+
|
|
39339
39346
|
// ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsResult.ts
|
|
39340
39347
|
var UiPathTestManagementHubTestManagementAbstractionsDTOsResult = {
|
|
39341
39348
|
None: "None",
|
|
@@ -39359,7 +39366,8 @@ var UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatus = {
|
|
|
39359
39366
|
Running: "running",
|
|
39360
39367
|
Cancelling: "cancelling",
|
|
39361
39368
|
Cancelled: "cancelled",
|
|
39362
|
-
Finished: "finished"
|
|
39369
|
+
Finished: "finished",
|
|
39370
|
+
Failed: "failed"
|
|
39363
39371
|
};
|
|
39364
39372
|
function UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatusFromJSON(json2) {
|
|
39365
39373
|
return UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatusFromJSONTyped(json2, false);
|
|
@@ -39389,6 +39397,7 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestCaseDtoFromJSO
|
|
|
39389
39397
|
foreignReference: json2["foreignReference"] == null ? undefined : json2["foreignReference"],
|
|
39390
39398
|
connectorTestCaseId: json2["connectorTestCaseId"] == null ? undefined : json2["connectorTestCaseId"],
|
|
39391
39399
|
isAutomated: json2["isAutomated"] == null ? undefined : json2["isAutomated"],
|
|
39400
|
+
hasLinkedAutomation: json2["hasLinkedAutomation"] == null ? undefined : json2["hasLinkedAutomation"],
|
|
39392
39401
|
packageVersion: json2["packageVersion"] == null ? undefined : json2["packageVersion"],
|
|
39393
39402
|
postCondition: json2["postCondition"] == null ? undefined : json2["postCondition"],
|
|
39394
39403
|
packageEntryPointUniqueId: json2["packageEntryPointUniqueId"] == null ? undefined : json2["packageEntryPointUniqueId"],
|
|
@@ -39399,6 +39408,9 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestCaseDtoFromJSO
|
|
|
39399
39408
|
studioWebProjectId: json2["studioWebProjectId"] == null ? undefined : json2["studioWebProjectId"],
|
|
39400
39409
|
studioWebFileId: json2["studioWebFileId"] == null ? undefined : json2["studioWebFileId"],
|
|
39401
39410
|
isHidden: json2["isHidden"] == null ? undefined : json2["isHidden"],
|
|
39411
|
+
isGoverned: json2["isGoverned"] == null ? undefined : json2["isGoverned"],
|
|
39412
|
+
approvalStatus: json2["approvalStatus"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSON(json2["approvalStatus"]),
|
|
39413
|
+
totalApproversRequired: json2["totalApproversRequired"] == null ? undefined : json2["totalApproversRequired"],
|
|
39402
39414
|
id: json2["id"] == null ? undefined : json2["id"],
|
|
39403
39415
|
name: json2["name"] == null ? undefined : json2["name"],
|
|
39404
39416
|
description: json2["description"] == null ? undefined : json2["description"],
|
|
@@ -39448,7 +39460,6 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestCaseLogWithTes
|
|
|
39448
39460
|
runId: json2["runId"] == null ? undefined : json2["runId"],
|
|
39449
39461
|
updated: json2["updated"] == null ? undefined : new Date(json2["updated"]),
|
|
39450
39462
|
executionOrder: json2["executionOrder"] == null ? undefined : json2["executionOrder"],
|
|
39451
|
-
governanceInfo: json2["governanceInfo"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsDTOsObjectGovernanceDtoFromJSON(json2["governanceInfo"]),
|
|
39452
39463
|
isGoverned: json2["isGoverned"] == null ? undefined : json2["isGoverned"],
|
|
39453
39464
|
approvalStatus: json2["approvalStatus"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSON(json2["approvalStatus"]),
|
|
39454
39465
|
totalApproversRequired: json2["totalApproversRequired"] == null ? undefined : json2["totalApproversRequired"],
|
|
@@ -39620,6 +39631,22 @@ function UiPathTestManagementHubTestManagementAbstractionsEnumsSourceToJSON(valu
|
|
|
39620
39631
|
return value;
|
|
39621
39632
|
}
|
|
39622
39633
|
|
|
39634
|
+
// ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsPlaywrightExecutionSnapshot.ts
|
|
39635
|
+
function UiPathTestManagementHubTestManagementAbstractionsDTOsPlaywrightExecutionSnapshotFromJSON(json2) {
|
|
39636
|
+
return UiPathTestManagementHubTestManagementAbstractionsDTOsPlaywrightExecutionSnapshotFromJSONTyped(json2, false);
|
|
39637
|
+
}
|
|
39638
|
+
function UiPathTestManagementHubTestManagementAbstractionsDTOsPlaywrightExecutionSnapshotFromJSONTyped(json2, ignoreDiscriminator) {
|
|
39639
|
+
if (json2 == null) {
|
|
39640
|
+
return json2;
|
|
39641
|
+
}
|
|
39642
|
+
return {
|
|
39643
|
+
packageName: json2["packageName"] == null ? undefined : json2["packageName"],
|
|
39644
|
+
version: json2["version"] == null ? undefined : json2["version"],
|
|
39645
|
+
projects: json2["projects"] == null ? undefined : json2["projects"],
|
|
39646
|
+
artifactLocationJson: json2["artifactLocationJson"] == null ? undefined : json2["artifactLocationJson"]
|
|
39647
|
+
};
|
|
39648
|
+
}
|
|
39649
|
+
|
|
39623
39650
|
// ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionStatus.ts
|
|
39624
39651
|
var UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionStatus = {
|
|
39625
39652
|
Pending: "pending",
|
|
@@ -39682,6 +39709,7 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestExecutionDtoFr
|
|
|
39682
39709
|
machineKey: json2["machineKey"] == null ? undefined : json2["machineKey"],
|
|
39683
39710
|
hostMachineName: json2["hostMachineName"] == null ? undefined : json2["hostMachineName"],
|
|
39684
39711
|
serviceUsername: json2["serviceUsername"] == null ? undefined : json2["serviceUsername"],
|
|
39712
|
+
playwrightExecutionSnapshot: json2["playwrightExecutionSnapshot"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsDTOsPlaywrightExecutionSnapshotFromJSON(json2["playwrightExecutionSnapshot"]),
|
|
39685
39713
|
id: json2["id"] == null ? undefined : json2["id"],
|
|
39686
39714
|
name: json2["name"] == null ? undefined : json2["name"],
|
|
39687
39715
|
description: json2["description"] == null ? undefined : json2["description"],
|
|
@@ -39731,7 +39759,6 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestCaseLogWithTes
|
|
|
39731
39759
|
runId: json2["runId"] == null ? undefined : json2["runId"],
|
|
39732
39760
|
updated: json2["updated"] == null ? undefined : new Date(json2["updated"]),
|
|
39733
39761
|
executionOrder: json2["executionOrder"] == null ? undefined : json2["executionOrder"],
|
|
39734
|
-
governanceInfo: json2["governanceInfo"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsDTOsObjectGovernanceDtoFromJSON(json2["governanceInfo"]),
|
|
39735
39762
|
isGoverned: json2["isGoverned"] == null ? undefined : json2["isGoverned"],
|
|
39736
39763
|
approvalStatus: json2["approvalStatus"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSON(json2["approvalStatus"]),
|
|
39737
39764
|
totalApproversRequired: json2["totalApproversRequired"] == null ? undefined : json2["totalApproversRequired"],
|
|
@@ -39800,6 +39827,7 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestExecutionWithS
|
|
|
39800
39827
|
machineKey: json2["machineKey"] == null ? undefined : json2["machineKey"],
|
|
39801
39828
|
hostMachineName: json2["hostMachineName"] == null ? undefined : json2["hostMachineName"],
|
|
39802
39829
|
serviceUsername: json2["serviceUsername"] == null ? undefined : json2["serviceUsername"],
|
|
39830
|
+
playwrightExecutionSnapshot: json2["playwrightExecutionSnapshot"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsDTOsPlaywrightExecutionSnapshotFromJSON(json2["playwrightExecutionSnapshot"]),
|
|
39803
39831
|
id: json2["id"] == null ? undefined : json2["id"],
|
|
39804
39832
|
name: json2["name"] == null ? undefined : json2["name"],
|
|
39805
39833
|
description: json2["description"] == null ? undefined : json2["description"],
|
|
@@ -39844,6 +39872,7 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestSetDtoFromJSON
|
|
|
39844
39872
|
videoRecordingSettings: json2["videoRecordingSettings"] == null ? undefined : UiPathTestManagementHubCommonDTOsVideoRecordingSettingsFromJSON(json2["videoRecordingSettings"]),
|
|
39845
39873
|
enforceExecutionOrder: json2["enforceExecutionOrder"] == null ? undefined : json2["enforceExecutionOrder"],
|
|
39846
39874
|
orderedExecutionSettings: json2["orderedExecutionSettings"] == null ? undefined : UiPathTestManagementHubCommonDTOsOrderedExecutionSettingsFromJSON(json2["orderedExecutionSettings"]),
|
|
39875
|
+
executionNameFormatOverride: json2["executionNameFormatOverride"] == null ? undefined : json2["executionNameFormatOverride"],
|
|
39847
39876
|
folderKey: json2["folderKey"] == null ? undefined : json2["folderKey"],
|
|
39848
39877
|
robotName: json2["robotName"] == null ? undefined : json2["robotName"],
|
|
39849
39878
|
robotUserKey: json2["robotUserKey"] == null ? undefined : json2["robotUserKey"],
|
|
@@ -40183,7 +40212,8 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsUpdateTestSetPacka
|
|
|
40183
40212
|
}
|
|
40184
40213
|
return {
|
|
40185
40214
|
packageName: value["packageName"],
|
|
40186
|
-
version: value["version"]
|
|
40215
|
+
version: value["version"],
|
|
40216
|
+
playwrightProjects: value["playwrightProjects"]
|
|
40187
40217
|
};
|
|
40188
40218
|
}
|
|
40189
40219
|
|
|
@@ -40518,7 +40548,6 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestCaseLogDtoFrom
|
|
|
40518
40548
|
runId: json2["runId"] == null ? undefined : json2["runId"],
|
|
40519
40549
|
updated: json2["updated"] == null ? undefined : new Date(json2["updated"]),
|
|
40520
40550
|
executionOrder: json2["executionOrder"] == null ? undefined : json2["executionOrder"],
|
|
40521
|
-
governanceInfo: json2["governanceInfo"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsDTOsObjectGovernanceDtoFromJSON(json2["governanceInfo"]),
|
|
40522
40551
|
isGoverned: json2["isGoverned"] == null ? undefined : json2["isGoverned"],
|
|
40523
40552
|
approvalStatus: json2["approvalStatus"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSON(json2["approvalStatus"]),
|
|
40524
40553
|
totalApproversRequired: json2["totalApproversRequired"] == null ? undefined : json2["totalApproversRequired"],
|
|
@@ -40544,7 +40573,23 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestSetPackageDtoF
|
|
|
40544
40573
|
return {
|
|
40545
40574
|
testSetId: json2["testSetId"] == null ? undefined : json2["testSetId"],
|
|
40546
40575
|
packageName: json2["packageName"] == null ? undefined : json2["packageName"],
|
|
40547
|
-
version: json2["version"] == null ? undefined : json2["version"]
|
|
40576
|
+
version: json2["version"] == null ? undefined : json2["version"],
|
|
40577
|
+
playwrightProjects: json2["playwrightProjects"] == null ? undefined : json2["playwrightProjects"]
|
|
40578
|
+
};
|
|
40579
|
+
}
|
|
40580
|
+
// ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsTestSetPlaywrightProjectContextDto.ts
|
|
40581
|
+
function UiPathTestManagementHubTestManagementAbstractionsDTOsTestSetPlaywrightProjectContextDtoFromJSON(json2) {
|
|
40582
|
+
return UiPathTestManagementHubTestManagementAbstractionsDTOsTestSetPlaywrightProjectContextDtoFromJSONTyped(json2, false);
|
|
40583
|
+
}
|
|
40584
|
+
function UiPathTestManagementHubTestManagementAbstractionsDTOsTestSetPlaywrightProjectContextDtoFromJSONTyped(json2, ignoreDiscriminator) {
|
|
40585
|
+
if (json2 == null) {
|
|
40586
|
+
return json2;
|
|
40587
|
+
}
|
|
40588
|
+
return {
|
|
40589
|
+
packageIdentifier: json2["packageIdentifier"] == null ? undefined : json2["packageIdentifier"],
|
|
40590
|
+
version: json2["version"] == null ? undefined : json2["version"],
|
|
40591
|
+
availablePlaywrightProjects: json2["availablePlaywrightProjects"] == null ? undefined : json2["availablePlaywrightProjects"],
|
|
40592
|
+
selectedPlaywrightProjects: json2["selectedPlaywrightProjects"] == null ? undefined : json2["selectedPlaywrightProjects"]
|
|
40548
40593
|
};
|
|
40549
40594
|
}
|
|
40550
40595
|
// ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsTestStepDto.ts
|
|
@@ -40841,6 +40886,33 @@ function UiPathTestManagementHubTestManagementAbstractionsRequestModelsSearchObj
|
|
|
40841
40886
|
labels: value["labels"]
|
|
40842
40887
|
};
|
|
40843
40888
|
}
|
|
40889
|
+
// ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsRequestModelsTestCasesFilterRequestModel.ts
|
|
40890
|
+
function UiPathTestManagementHubTestManagementAbstractionsRequestModelsTestCasesFilterRequestModelToJSON(json2) {
|
|
40891
|
+
return UiPathTestManagementHubTestManagementAbstractionsRequestModelsTestCasesFilterRequestModelToJSONTyped(json2, false);
|
|
40892
|
+
}
|
|
40893
|
+
function UiPathTestManagementHubTestManagementAbstractionsRequestModelsTestCasesFilterRequestModelToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40894
|
+
if (value == null) {
|
|
40895
|
+
return value;
|
|
40896
|
+
}
|
|
40897
|
+
return {
|
|
40898
|
+
projectid: value["projectid"],
|
|
40899
|
+
folderId: value["folderId"],
|
|
40900
|
+
testsetid: value["testsetid"],
|
|
40901
|
+
requirementid: value["requirementid"],
|
|
40902
|
+
onlynotautomated: value["onlynotautomated"],
|
|
40903
|
+
onlyDynamicallyAssigned: value["onlyDynamicallyAssigned"],
|
|
40904
|
+
updatedby: value["updatedby"],
|
|
40905
|
+
labels: value["labels"],
|
|
40906
|
+
studioProjectNames: value["studioProjectNames"],
|
|
40907
|
+
packageNames: value["packageNames"],
|
|
40908
|
+
resultTypes: value["resultTypes"] == null ? undefined : value["resultTypes"].map(UiPathTestManagementHubTestManagementAbstractionsDTOsResultToJSON),
|
|
40909
|
+
ids: value["ids"],
|
|
40910
|
+
search: value["search"],
|
|
40911
|
+
orderBy: value["orderBy"],
|
|
40912
|
+
top: value["top"],
|
|
40913
|
+
skip: value["skip"]
|
|
40914
|
+
};
|
|
40915
|
+
}
|
|
40844
40916
|
// ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsRequestModelsTestExecutionsFilterRequestModel.ts
|
|
40845
40917
|
function UiPathTestManagementHubTestManagementAbstractionsRequestModelsTestExecutionsFilterRequestModelToJSON(json2) {
|
|
40846
40918
|
return UiPathTestManagementHubTestManagementAbstractionsRequestModelsTestExecutionsFilterRequestModelToJSONTyped(json2, false);
|
|
@@ -41378,7 +41450,7 @@ class CustomFieldDefinitionsApi extends BaseAPI {
|
|
|
41378
41450
|
}
|
|
41379
41451
|
const queryParameters = {};
|
|
41380
41452
|
const headerParameters = {};
|
|
41381
|
-
headerParameters["Content-Type"] = "application/json
|
|
41453
|
+
headerParameters["Content-Type"] = "application/json";
|
|
41382
41454
|
if (this.configuration && this.configuration.accessToken) {
|
|
41383
41455
|
const token = this.configuration.accessToken;
|
|
41384
41456
|
const tokenString = await token("Bearer", []);
|
|
@@ -41637,7 +41709,7 @@ class CustomFieldLabelsApi extends BaseAPI {
|
|
|
41637
41709
|
}
|
|
41638
41710
|
const queryParameters = {};
|
|
41639
41711
|
const headerParameters = {};
|
|
41640
|
-
headerParameters["Content-Type"] = "application/json
|
|
41712
|
+
headerParameters["Content-Type"] = "application/json";
|
|
41641
41713
|
if (this.configuration && this.configuration.accessToken) {
|
|
41642
41714
|
const token = this.configuration.accessToken;
|
|
41643
41715
|
const tokenString = await token("Bearer", []);
|
|
@@ -41960,7 +42032,7 @@ class ObjectLabelsApi extends BaseAPI {
|
|
|
41960
42032
|
}
|
|
41961
42033
|
const queryParameters = {};
|
|
41962
42034
|
const headerParameters = {};
|
|
41963
|
-
headerParameters["Content-Type"] = "application/json
|
|
42035
|
+
headerParameters["Content-Type"] = "application/json";
|
|
41964
42036
|
if (this.configuration && this.configuration.accessToken) {
|
|
41965
42037
|
const token = this.configuration.accessToken;
|
|
41966
42038
|
const tokenString = await token("Bearer", []);
|
|
@@ -42633,7 +42705,7 @@ class RequirementsApi extends BaseAPI {
|
|
|
42633
42705
|
queryParameters["projectKey"] = requestParameters["projectKey"];
|
|
42634
42706
|
}
|
|
42635
42707
|
const headerParameters = {};
|
|
42636
|
-
headerParameters["Content-Type"] = "application/json
|
|
42708
|
+
headerParameters["Content-Type"] = "application/json";
|
|
42637
42709
|
if (this.configuration && this.configuration.accessToken) {
|
|
42638
42710
|
const token = this.configuration.accessToken;
|
|
42639
42711
|
const tokenString = await token("Bearer", []);
|
|
@@ -42854,7 +42926,7 @@ class RequirementsApi extends BaseAPI {
|
|
|
42854
42926
|
}
|
|
42855
42927
|
const queryParameters = {};
|
|
42856
42928
|
const headerParameters = {};
|
|
42857
|
-
headerParameters["Content-Type"] = "application/json
|
|
42929
|
+
headerParameters["Content-Type"] = "application/json";
|
|
42858
42930
|
if (this.configuration && this.configuration.accessToken) {
|
|
42859
42931
|
const token = this.configuration.accessToken;
|
|
42860
42932
|
const tokenString = await token("Bearer", []);
|
|
@@ -43647,6 +43719,39 @@ class TestCasesApi extends BaseAPI {
|
|
|
43647
43719
|
async testCasesDelete(requestParameters, initOverrides) {
|
|
43648
43720
|
await this.testCasesDeleteRaw(requestParameters, initOverrides);
|
|
43649
43721
|
}
|
|
43722
|
+
async testCasesGetFilteredTestCasesRequestOpts(requestParameters) {
|
|
43723
|
+
if (requestParameters["projectId"] == null) {
|
|
43724
|
+
throw new RequiredError("projectId", 'Required parameter "projectId" was null or undefined when calling testCasesGetFilteredTestCases().');
|
|
43725
|
+
}
|
|
43726
|
+
const queryParameters = {};
|
|
43727
|
+
const headerParameters = {};
|
|
43728
|
+
headerParameters["Content-Type"] = "application/json";
|
|
43729
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
43730
|
+
const token = this.configuration.accessToken;
|
|
43731
|
+
const tokenString = await token("Bearer", []);
|
|
43732
|
+
if (tokenString) {
|
|
43733
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
43734
|
+
}
|
|
43735
|
+
}
|
|
43736
|
+
let urlPath = `/api/v2/{projectId}/testcases/filtered`;
|
|
43737
|
+
urlPath = urlPath.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters["projectId"])));
|
|
43738
|
+
return {
|
|
43739
|
+
path: urlPath,
|
|
43740
|
+
method: "POST",
|
|
43741
|
+
headers: headerParameters,
|
|
43742
|
+
query: queryParameters,
|
|
43743
|
+
body: UiPathTestManagementHubTestManagementAbstractionsRequestModelsTestCasesFilterRequestModelToJSON(requestParameters["uiPathTestManagementHubTestManagementAbstractionsRequestModelsTestCasesFilterRequestModel"])
|
|
43744
|
+
};
|
|
43745
|
+
}
|
|
43746
|
+
async testCasesGetFilteredTestCasesRaw(requestParameters, initOverrides) {
|
|
43747
|
+
const requestOptions = await this.testCasesGetFilteredTestCasesRequestOpts(requestParameters);
|
|
43748
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
43749
|
+
return new JSONApiResponse(response, (jsonValue) => UiPathTestManagementHubCommonDTOsPagingModelDto1UiPathTestManagementHubTestManagementAbstractionsDTOsTestCaseDtoFromJSON(jsonValue));
|
|
43750
|
+
}
|
|
43751
|
+
async testCasesGetFilteredTestCases(requestParameters, initOverrides) {
|
|
43752
|
+
const response = await this.testCasesGetFilteredTestCasesRaw(requestParameters, initOverrides);
|
|
43753
|
+
return await response.value();
|
|
43754
|
+
}
|
|
43650
43755
|
async testCasesGetTestCaseBatchRequestOpts(requestParameters) {
|
|
43651
43756
|
if (requestParameters["projectId"] == null) {
|
|
43652
43757
|
throw new RequiredError("projectId", 'Required parameter "projectId" was null or undefined when calling testCasesGetTestCaseBatch().');
|
|
@@ -43680,6 +43785,41 @@ class TestCasesApi extends BaseAPI {
|
|
|
43680
43785
|
const response = await this.testCasesGetTestCaseBatchRaw(requestParameters, initOverrides);
|
|
43681
43786
|
return await response.value();
|
|
43682
43787
|
}
|
|
43788
|
+
async testCasesGetTestCaseByObjKeyAndProjectIdRequestOpts(requestParameters) {
|
|
43789
|
+
if (requestParameters["objKey"] == null) {
|
|
43790
|
+
throw new RequiredError("objKey", 'Required parameter "objKey" was null or undefined when calling testCasesGetTestCaseByObjKeyAndProjectId().');
|
|
43791
|
+
}
|
|
43792
|
+
if (requestParameters["projectId"] == null) {
|
|
43793
|
+
throw new RequiredError("projectId", 'Required parameter "projectId" was null or undefined when calling testCasesGetTestCaseByObjKeyAndProjectId().');
|
|
43794
|
+
}
|
|
43795
|
+
const queryParameters = {};
|
|
43796
|
+
const headerParameters = {};
|
|
43797
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
43798
|
+
const token = this.configuration.accessToken;
|
|
43799
|
+
const tokenString = await token("Bearer", []);
|
|
43800
|
+
if (tokenString) {
|
|
43801
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
43802
|
+
}
|
|
43803
|
+
}
|
|
43804
|
+
let urlPath = `/api/v2/{projectId}/testcases/objkey/{objKey}`;
|
|
43805
|
+
urlPath = urlPath.replace(`{${"objKey"}}`, encodeURIComponent(String(requestParameters["objKey"])));
|
|
43806
|
+
urlPath = urlPath.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters["projectId"])));
|
|
43807
|
+
return {
|
|
43808
|
+
path: urlPath,
|
|
43809
|
+
method: "GET",
|
|
43810
|
+
headers: headerParameters,
|
|
43811
|
+
query: queryParameters
|
|
43812
|
+
};
|
|
43813
|
+
}
|
|
43814
|
+
async testCasesGetTestCaseByObjKeyAndProjectIdRaw(requestParameters, initOverrides) {
|
|
43815
|
+
const requestOptions = await this.testCasesGetTestCaseByObjKeyAndProjectIdRequestOpts(requestParameters);
|
|
43816
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
43817
|
+
return new JSONApiResponse(response, (jsonValue) => UiPathTestManagementHubTestManagementAbstractionsDTOsTestCaseDtoFromJSON(jsonValue));
|
|
43818
|
+
}
|
|
43819
|
+
async testCasesGetTestCaseByObjKeyAndProjectId(requestParameters, initOverrides) {
|
|
43820
|
+
const response = await this.testCasesGetTestCaseByObjKeyAndProjectIdRaw(requestParameters, initOverrides);
|
|
43821
|
+
return await response.value();
|
|
43822
|
+
}
|
|
43683
43823
|
async testCasesGetTestCasesRequestOpts(requestParameters) {
|
|
43684
43824
|
if (requestParameters["projectId"] == null) {
|
|
43685
43825
|
throw new RequiredError("projectId", 'Required parameter "projectId" was null or undefined when calling testCasesGetTestCases().');
|
|
@@ -43972,7 +44112,7 @@ class TestExecutionsApi extends BaseAPI {
|
|
|
43972
44112
|
}
|
|
43973
44113
|
const queryParameters = {};
|
|
43974
44114
|
const headerParameters = {};
|
|
43975
|
-
headerParameters["Content-Type"] = "application/json
|
|
44115
|
+
headerParameters["Content-Type"] = "application/json";
|
|
43976
44116
|
if (this.configuration && this.configuration.accessToken) {
|
|
43977
44117
|
const token = this.configuration.accessToken;
|
|
43978
44118
|
const tokenString = await token("Bearer", []);
|
|
@@ -44047,7 +44187,7 @@ class TestSetsApi extends BaseAPI {
|
|
|
44047
44187
|
}
|
|
44048
44188
|
const queryParameters = {};
|
|
44049
44189
|
const headerParameters = {};
|
|
44050
|
-
headerParameters["Content-Type"] = "application/json
|
|
44190
|
+
headerParameters["Content-Type"] = "application/json";
|
|
44051
44191
|
if (this.configuration && this.configuration.accessToken) {
|
|
44052
44192
|
const token = this.configuration.accessToken;
|
|
44053
44193
|
const tokenString = await token("Bearer", []);
|
|
@@ -44246,6 +44386,50 @@ class TestSetsApi extends BaseAPI {
|
|
|
44246
44386
|
const response = await this.testSetsGetByIdRaw(requestParameters, initOverrides);
|
|
44247
44387
|
return await response.value();
|
|
44248
44388
|
}
|
|
44389
|
+
async testSetsGetPlaywrightProjectContextRequestOpts(requestParameters) {
|
|
44390
|
+
if (requestParameters["id"] == null) {
|
|
44391
|
+
throw new RequiredError("id", 'Required parameter "id" was null or undefined when calling testSetsGetPlaywrightProjectContext().');
|
|
44392
|
+
}
|
|
44393
|
+
if (requestParameters["projectId"] == null) {
|
|
44394
|
+
throw new RequiredError("projectId", 'Required parameter "projectId" was null or undefined when calling testSetsGetPlaywrightProjectContext().');
|
|
44395
|
+
}
|
|
44396
|
+
const queryParameters = {};
|
|
44397
|
+
if (requestParameters["folderKey"] != null) {
|
|
44398
|
+
queryParameters["folderKey"] = requestParameters["folderKey"];
|
|
44399
|
+
}
|
|
44400
|
+
if (requestParameters["packageIdentifier"] != null) {
|
|
44401
|
+
queryParameters["packageIdentifier"] = requestParameters["packageIdentifier"];
|
|
44402
|
+
}
|
|
44403
|
+
if (requestParameters["version"] != null) {
|
|
44404
|
+
queryParameters["version"] = requestParameters["version"];
|
|
44405
|
+
}
|
|
44406
|
+
const headerParameters = {};
|
|
44407
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
44408
|
+
const token = this.configuration.accessToken;
|
|
44409
|
+
const tokenString = await token("Bearer", []);
|
|
44410
|
+
if (tokenString) {
|
|
44411
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
44412
|
+
}
|
|
44413
|
+
}
|
|
44414
|
+
let urlPath = `/api/v2/{projectId}/testsets/{id}/playwright-project-context`;
|
|
44415
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
|
|
44416
|
+
urlPath = urlPath.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters["projectId"])));
|
|
44417
|
+
return {
|
|
44418
|
+
path: urlPath,
|
|
44419
|
+
method: "GET",
|
|
44420
|
+
headers: headerParameters,
|
|
44421
|
+
query: queryParameters
|
|
44422
|
+
};
|
|
44423
|
+
}
|
|
44424
|
+
async testSetsGetPlaywrightProjectContextRaw(requestParameters, initOverrides) {
|
|
44425
|
+
const requestOptions = await this.testSetsGetPlaywrightProjectContextRequestOpts(requestParameters);
|
|
44426
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
44427
|
+
return new JSONApiResponse(response, (jsonValue) => UiPathTestManagementHubTestManagementAbstractionsDTOsTestSetPlaywrightProjectContextDtoFromJSON(jsonValue));
|
|
44428
|
+
}
|
|
44429
|
+
async testSetsGetPlaywrightProjectContext(requestParameters, initOverrides) {
|
|
44430
|
+
const response = await this.testSetsGetPlaywrightProjectContextRaw(requestParameters, initOverrides);
|
|
44431
|
+
return await response.value();
|
|
44432
|
+
}
|
|
44249
44433
|
async testSetsGetTestSetByObjKeyAndProjectIdRequestOpts(requestParameters) {
|
|
44250
44434
|
if (requestParameters["objKey"] == null) {
|
|
44251
44435
|
throw new RequiredError("objKey", 'Required parameter "objKey" was null or undefined when calling testSetsGetTestSetByObjKeyAndProjectId().');
|
|
@@ -44447,6 +44631,42 @@ class TestSetsApi extends BaseAPI {
|
|
|
44447
44631
|
const response = await this.testSetsStartExecuteRaw(requestParameters, initOverrides);
|
|
44448
44632
|
return await response.value();
|
|
44449
44633
|
}
|
|
44634
|
+
async testSetsUnAssignTestCasesRequestOpts(requestParameters) {
|
|
44635
|
+
if (requestParameters["id"] == null) {
|
|
44636
|
+
throw new RequiredError("id", 'Required parameter "id" was null or undefined when calling testSetsUnAssignTestCases().');
|
|
44637
|
+
}
|
|
44638
|
+
if (requestParameters["projectId"] == null) {
|
|
44639
|
+
throw new RequiredError("projectId", 'Required parameter "projectId" was null or undefined when calling testSetsUnAssignTestCases().');
|
|
44640
|
+
}
|
|
44641
|
+
const queryParameters = {};
|
|
44642
|
+
const headerParameters = {};
|
|
44643
|
+
headerParameters["Content-Type"] = "application/json";
|
|
44644
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
44645
|
+
const token = this.configuration.accessToken;
|
|
44646
|
+
const tokenString = await token("Bearer", []);
|
|
44647
|
+
if (tokenString) {
|
|
44648
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
44649
|
+
}
|
|
44650
|
+
}
|
|
44651
|
+
let urlPath = `/api/v2/{projectId}/testsets/{id}/unassigntestcases`;
|
|
44652
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
|
|
44653
|
+
urlPath = urlPath.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters["projectId"])));
|
|
44654
|
+
return {
|
|
44655
|
+
path: urlPath,
|
|
44656
|
+
method: "POST",
|
|
44657
|
+
headers: headerParameters,
|
|
44658
|
+
query: queryParameters,
|
|
44659
|
+
body: requestParameters["requestBody"]
|
|
44660
|
+
};
|
|
44661
|
+
}
|
|
44662
|
+
async testSetsUnAssignTestCasesRaw(requestParameters, initOverrides) {
|
|
44663
|
+
const requestOptions = await this.testSetsUnAssignTestCasesRequestOpts(requestParameters);
|
|
44664
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
44665
|
+
return new VoidApiResponse(response);
|
|
44666
|
+
}
|
|
44667
|
+
async testSetsUnAssignTestCases(requestParameters, initOverrides) {
|
|
44668
|
+
await this.testSetsUnAssignTestCasesRaw(requestParameters, initOverrides);
|
|
44669
|
+
}
|
|
44450
44670
|
async testSetsUpdateRequestOpts(requestParameters) {
|
|
44451
44671
|
if (requestParameters["id"] == null) {
|
|
44452
44672
|
throw new RequiredError("id", 'Required parameter "id" was null or undefined when calling testSetsUpdate().');
|
|
@@ -44519,6 +44739,42 @@ class TestSetsApi extends BaseAPI {
|
|
|
44519
44739
|
async testSetsUpdateTestSetFolderKey(requestParameters, initOverrides) {
|
|
44520
44740
|
await this.testSetsUpdateTestSetFolderKeyRaw(requestParameters, initOverrides);
|
|
44521
44741
|
}
|
|
44742
|
+
async testSetsUpdateTestSetPackagesRequestOpts(requestParameters) {
|
|
44743
|
+
if (requestParameters["id"] == null) {
|
|
44744
|
+
throw new RequiredError("id", 'Required parameter "id" was null or undefined when calling testSetsUpdateTestSetPackages().');
|
|
44745
|
+
}
|
|
44746
|
+
if (requestParameters["projectId"] == null) {
|
|
44747
|
+
throw new RequiredError("projectId", 'Required parameter "projectId" was null or undefined when calling testSetsUpdateTestSetPackages().');
|
|
44748
|
+
}
|
|
44749
|
+
const queryParameters = {};
|
|
44750
|
+
const headerParameters = {};
|
|
44751
|
+
headerParameters["Content-Type"] = "application/json";
|
|
44752
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
44753
|
+
const token = this.configuration.accessToken;
|
|
44754
|
+
const tokenString = await token("Bearer", []);
|
|
44755
|
+
if (tokenString) {
|
|
44756
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
44757
|
+
}
|
|
44758
|
+
}
|
|
44759
|
+
let urlPath = `/api/v2/{projectId}/testsets/{id}/testsetpackages`;
|
|
44760
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
|
|
44761
|
+
urlPath = urlPath.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters["projectId"])));
|
|
44762
|
+
return {
|
|
44763
|
+
path: urlPath,
|
|
44764
|
+
method: "POST",
|
|
44765
|
+
headers: headerParameters,
|
|
44766
|
+
query: queryParameters,
|
|
44767
|
+
body: requestParameters["uiPathTestManagementHubTestManagementAbstractionsDTOsUpdateTestSetPackageRequest"].map(UiPathTestManagementHubTestManagementAbstractionsDTOsUpdateTestSetPackageRequestToJSON)
|
|
44768
|
+
};
|
|
44769
|
+
}
|
|
44770
|
+
async testSetsUpdateTestSetPackagesRaw(requestParameters, initOverrides) {
|
|
44771
|
+
const requestOptions = await this.testSetsUpdateTestSetPackagesRequestOpts(requestParameters);
|
|
44772
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
44773
|
+
return new VoidApiResponse(response);
|
|
44774
|
+
}
|
|
44775
|
+
async testSetsUpdateTestSetPackages(requestParameters, initOverrides) {
|
|
44776
|
+
await this.testSetsUpdateTestSetPackagesRaw(requestParameters, initOverrides);
|
|
44777
|
+
}
|
|
44522
44778
|
async testSetsUpdateTestSetRobotRequestOpts(requestParameters) {
|
|
44523
44779
|
if (requestParameters["id"] == null) {
|
|
44524
44780
|
throw new RequiredError("id", 'Required parameter "id" was null or undefined when calling testSetsUpdateTestSetRobot().');
|
|
@@ -55176,6 +55432,51 @@ function toStepOutput(step) {
|
|
|
55176
55432
|
return toOutput(step);
|
|
55177
55433
|
}
|
|
55178
55434
|
|
|
55435
|
+
// src/mappers/input/testset.input.ts
|
|
55436
|
+
function toFilteredTestCasesRequest(projectId, labels, top, skip) {
|
|
55437
|
+
return {
|
|
55438
|
+
projectId,
|
|
55439
|
+
uiPathTestManagementHubTestManagementAbstractionsRequestModelsTestCasesFilterRequestModel: { labels, top, skip }
|
|
55440
|
+
};
|
|
55441
|
+
}
|
|
55442
|
+
function toPlaywrightProjectContextRequest(projectId, testSetId) {
|
|
55443
|
+
return { id: testSetId, projectId };
|
|
55444
|
+
}
|
|
55445
|
+
function toUpdateTestSetPackagesRequest(projectId, testSetId, packageName, version, projects) {
|
|
55446
|
+
return {
|
|
55447
|
+
id: testSetId,
|
|
55448
|
+
projectId,
|
|
55449
|
+
uiPathTestManagementHubTestManagementAbstractionsDTOsUpdateTestSetPackageRequest: [{ packageName, version, playwrightProjects: projects }]
|
|
55450
|
+
};
|
|
55451
|
+
}
|
|
55452
|
+
|
|
55453
|
+
// src/utils/label-select.ts
|
|
55454
|
+
var FILTER_PAGE_SIZE = 200;
|
|
55455
|
+
var FILTER_MAX_PAGES = 50;
|
|
55456
|
+
async function findTestCasesByLabels(testCasesApi, projectId, labels, maxMatches) {
|
|
55457
|
+
const rows = [];
|
|
55458
|
+
const seen = new Set;
|
|
55459
|
+
for (let page = 0;; page++) {
|
|
55460
|
+
if (page >= FILTER_MAX_PAGES) {
|
|
55461
|
+
throw new Error(`Label query matched more than ${FILTER_MAX_PAGES * FILTER_PAGE_SIZE} test cases — narrow the label selection (labels: ${labels.join(", ")}).`);
|
|
55462
|
+
}
|
|
55463
|
+
const response = await testCasesApi.testCasesGetFilteredTestCases(toFilteredTestCasesRequest(projectId, labels, FILTER_PAGE_SIZE, page * FILTER_PAGE_SIZE));
|
|
55464
|
+
const items = response.data ?? [];
|
|
55465
|
+
for (const item of items) {
|
|
55466
|
+
if (item.id && item.objKey && !seen.has(item.id)) {
|
|
55467
|
+
seen.add(item.id);
|
|
55468
|
+
rows.push({ id: item.id, objKey: item.objKey });
|
|
55469
|
+
if (maxMatches !== undefined && rows.length >= maxMatches) {
|
|
55470
|
+
return rows;
|
|
55471
|
+
}
|
|
55472
|
+
}
|
|
55473
|
+
}
|
|
55474
|
+
if (items.length < FILTER_PAGE_SIZE) {
|
|
55475
|
+
return rows;
|
|
55476
|
+
}
|
|
55477
|
+
}
|
|
55478
|
+
}
|
|
55479
|
+
|
|
55179
55480
|
// src/utils/step-input.ts
|
|
55180
55481
|
function hasScalarStep(options) {
|
|
55181
55482
|
return options.description !== undefined || options.expectedResult !== undefined || options.actionType !== undefined || options.clipboardData !== undefined || options.orderNo !== undefined;
|
|
@@ -55322,7 +55623,7 @@ var TESTCASE_DELETE_EXAMPLES = [
|
|
|
55322
55623
|
var TESTCASE_ADD_EXAMPLES = [
|
|
55323
55624
|
{
|
|
55324
55625
|
Description: "Add test cases to a test set",
|
|
55325
|
-
Command: "uip tm testcases add --test-set-key DEMO:10 --test-case-keys DEMO:1
|
|
55626
|
+
Command: "uip tm testcases add --test-set-key DEMO:10 --test-case-keys DEMO:1 DEMO:2",
|
|
55326
55627
|
Output: {
|
|
55327
55628
|
Code: "TestSetAddTestCases",
|
|
55328
55629
|
Data: {
|
|
@@ -55331,6 +55632,19 @@ var TESTCASE_ADD_EXAMPLES = [
|
|
|
55331
55632
|
Result: "Added"
|
|
55332
55633
|
}
|
|
55333
55634
|
}
|
|
55635
|
+
},
|
|
55636
|
+
{
|
|
55637
|
+
Description: "Add every test case carrying one of the given labels (e.g. the PW_* labels that 'tm pack' Playwright ingestion applies)",
|
|
55638
|
+
Command: "uip tm testcases add --test-set-key DEMO:10 --labels PW_Tag_smoke PW_Project_chromium",
|
|
55639
|
+
Output: {
|
|
55640
|
+
Code: "TestSetAddTestCases",
|
|
55641
|
+
Data: {
|
|
55642
|
+
TestSetKey: "DEMO:10",
|
|
55643
|
+
Added: "DEMO:3, DEMO:4, DEMO:7",
|
|
55644
|
+
MatchedLabels: "PW_Tag_smoke, PW_Project_chromium",
|
|
55645
|
+
Result: "Added"
|
|
55646
|
+
}
|
|
55647
|
+
}
|
|
55334
55648
|
}
|
|
55335
55649
|
];
|
|
55336
55650
|
var TESTCASE_REMOVE_EXAMPLES = [
|
|
@@ -56516,7 +56830,27 @@ var registerTestcaseCommand = (program2) => {
|
|
|
56516
56830
|
Result: "Deleted"
|
|
56517
56831
|
}));
|
|
56518
56832
|
});
|
|
56519
|
-
testcaseCmd.command("add").description("Add test cases to a test set.").requiredOption("--test-set-key <key>", "Test set object key (e.g. DEMO:42)").
|
|
56833
|
+
testcaseCmd.command("add").description("Add test cases to a test set, either by explicit keys or by label.").requiredOption("--test-set-key <key>", "Test set object key (e.g. DEMO:42)").option("--test-case-keys <keys...>", "Test case keys to add, space-separated (e.g. DEMO:1 DEMO:2). Comma-separated values are also accepted. Mutually exclusive with --labels; pass exactly one.").option("--labels <labels...>", "Label names, space-separated (quote names that contain spaces). Adds every test case in the project carrying at least one of the labels. Works with any object label — for Playwright packages this includes the PW_Tag_*, PW_Project_*, PW_Suite_* and PW_File_* labels applied at ingestion. Mutually exclusive with --test-case-keys; pass exactly one.").option("--limit <count>", "Maximum number of label-matched test cases to add (only with --labels). Default: all matches. Prefer precise labels to keep the match set small.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTCASE_ADD_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
56834
|
+
if (options.testCaseKeys && options.labels || !options.testCaseKeys && !options.labels) {
|
|
56835
|
+
OutputFormatter.error({
|
|
56836
|
+
Result: RESULTS.Failure,
|
|
56837
|
+
Message: "Pass exactly one of --test-case-keys or --labels.",
|
|
56838
|
+
Instructions: "Use --test-case-keys DEMO:1,DEMO:2 for explicit test cases, or --labels PW_Tag_smoke to add every test case carrying one of the labels."
|
|
56839
|
+
});
|
|
56840
|
+
processContext.exit(1);
|
|
56841
|
+
return;
|
|
56842
|
+
}
|
|
56843
|
+
const testCaseKeys = (options.testCaseKeys ?? []).flatMap((k) => k.split(",")).map((k) => k.trim()).filter(Boolean);
|
|
56844
|
+
const labels = (options.labels ?? []).map((l) => l.trim()).filter(Boolean);
|
|
56845
|
+
if (testCaseKeys.length === 0 && labels.length === 0) {
|
|
56846
|
+
OutputFormatter.error({
|
|
56847
|
+
Result: RESULTS.Failure,
|
|
56848
|
+
Message: "The provided --test-case-keys/--labels value is empty.",
|
|
56849
|
+
Instructions: "Pass at least one test case key (e.g. DEMO:1) or label name (e.g. PW_Tag_smoke)."
|
|
56850
|
+
});
|
|
56851
|
+
processContext.exit(1);
|
|
56852
|
+
return;
|
|
56853
|
+
}
|
|
56520
56854
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
56521
56855
|
if (authError) {
|
|
56522
56856
|
OutputFormatter.error({
|
|
@@ -56531,9 +56865,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
56531
56865
|
return;
|
|
56532
56866
|
const { tmConfig, projectId } = ctx;
|
|
56533
56867
|
const testSetsApi = new TestSetsApi(tmConfig);
|
|
56534
|
-
const testCasesApi = new TestCasesApi(tmConfig);
|
|
56535
56868
|
const testSetKey = options.testSetKey;
|
|
56536
|
-
const testCaseKeys = options.testCaseKeys.split(",").map((k) => k.trim()).filter(Boolean);
|
|
56537
56869
|
const [error, testSet] = await catchError(testSetsApi.testSetsGetTestSetByObjKeyAndProjectId({
|
|
56538
56870
|
objKey: testSetKey,
|
|
56539
56871
|
projectId
|
|
@@ -56559,14 +56891,23 @@ var registerTestcaseCommand = (program2) => {
|
|
|
56559
56891
|
return;
|
|
56560
56892
|
}
|
|
56561
56893
|
const testCaseIds = [];
|
|
56562
|
-
|
|
56563
|
-
|
|
56564
|
-
|
|
56565
|
-
|
|
56566
|
-
|
|
56567
|
-
|
|
56568
|
-
|
|
56569
|
-
|
|
56894
|
+
const addedKeys = [];
|
|
56895
|
+
if (labels.length > 0) {
|
|
56896
|
+
let labelLimit;
|
|
56897
|
+
if (options.limit !== undefined) {
|
|
56898
|
+
labelLimit = Number(options.limit);
|
|
56899
|
+
if (!Number.isInteger(labelLimit) || labelLimit < 1) {
|
|
56900
|
+
OutputFormatter.error({
|
|
56901
|
+
Result: RESULTS.Failure,
|
|
56902
|
+
Message: "--limit must be a positive integer."
|
|
56903
|
+
});
|
|
56904
|
+
processContext.exit(1);
|
|
56905
|
+
return;
|
|
56906
|
+
}
|
|
56907
|
+
}
|
|
56908
|
+
const [labelError, matches] = await catchError(findTestCasesByLabels(new TestCasesApi(tmConfig), projectId, labels, labelLimit));
|
|
56909
|
+
if (labelError) {
|
|
56910
|
+
const { message, details } = await extractErrorDetails2(labelError, { forbiddenMessage: TM_FORBIDDEN_MESSAGE });
|
|
56570
56911
|
OutputFormatter.error({
|
|
56571
56912
|
Result: RESULTS.Failure,
|
|
56572
56913
|
Message: message,
|
|
@@ -56575,17 +56916,47 @@ var registerTestcaseCommand = (program2) => {
|
|
|
56575
56916
|
processContext.exit(1);
|
|
56576
56917
|
return;
|
|
56577
56918
|
}
|
|
56578
|
-
|
|
56579
|
-
const tc = items.find((t) => t.objKey?.toLowerCase() === tcKey.toLowerCase());
|
|
56580
|
-
if (!tc?.id) {
|
|
56919
|
+
if (!matches || matches.length === 0) {
|
|
56581
56920
|
OutputFormatter.error({
|
|
56582
56921
|
Result: RESULTS.Failure,
|
|
56583
|
-
Message: `
|
|
56922
|
+
Message: `No test cases carry any of the labels: ${labels.join(", ")}.`,
|
|
56923
|
+
Instructions: "Check the label names with 'uip tm objectlabel list --object-type testcase'. Label matching is exact and case-sensitive."
|
|
56584
56924
|
});
|
|
56585
56925
|
processContext.exit(1);
|
|
56586
56926
|
return;
|
|
56587
56927
|
}
|
|
56588
|
-
|
|
56928
|
+
for (const match of matches) {
|
|
56929
|
+
testCaseIds.push(match.id);
|
|
56930
|
+
addedKeys.push(match.objKey);
|
|
56931
|
+
}
|
|
56932
|
+
} else {
|
|
56933
|
+
const testCasesApi = new TestCasesApi(tmConfig);
|
|
56934
|
+
for (const tcKey of testCaseKeys) {
|
|
56935
|
+
const [tcError, tc] = await catchError(testCasesApi.testCasesGetTestCaseByObjKeyAndProjectId({
|
|
56936
|
+
objKey: tcKey,
|
|
56937
|
+
projectId
|
|
56938
|
+
}));
|
|
56939
|
+
if (tcError) {
|
|
56940
|
+
const { message, details } = await extractErrorDetails2(tcError, { forbiddenMessage: TM_FORBIDDEN_MESSAGE });
|
|
56941
|
+
OutputFormatter.error({
|
|
56942
|
+
Result: RESULTS.Failure,
|
|
56943
|
+
Message: message,
|
|
56944
|
+
Instructions: details
|
|
56945
|
+
});
|
|
56946
|
+
processContext.exit(1);
|
|
56947
|
+
return;
|
|
56948
|
+
}
|
|
56949
|
+
if (!tc?.id) {
|
|
56950
|
+
OutputFormatter.error({
|
|
56951
|
+
Result: RESULTS.Failure,
|
|
56952
|
+
Message: `Test case '${tcKey}' not found.`
|
|
56953
|
+
});
|
|
56954
|
+
processContext.exit(1);
|
|
56955
|
+
return;
|
|
56956
|
+
}
|
|
56957
|
+
testCaseIds.push(tc.id);
|
|
56958
|
+
addedKeys.push(tcKey);
|
|
56959
|
+
}
|
|
56589
56960
|
}
|
|
56590
56961
|
const [assignError] = await catchError(testSetsApi.testSetsAssignTestCases({
|
|
56591
56962
|
id: testSet.id,
|
|
@@ -56604,7 +56975,8 @@ var registerTestcaseCommand = (program2) => {
|
|
|
56604
56975
|
}
|
|
56605
56976
|
OutputFormatter.success(new SuccessOutput("TestSetAddTestCases", {
|
|
56606
56977
|
TestSetKey: testSetKey,
|
|
56607
|
-
Added:
|
|
56978
|
+
Added: addedKeys.join(", "),
|
|
56979
|
+
...labels.length > 0 ? { MatchedLabels: labels.join(", ") } : {},
|
|
56608
56980
|
Result: "Added"
|
|
56609
56981
|
}));
|
|
56610
56982
|
});
|
|
@@ -56683,10 +57055,10 @@ var registerTestcaseCommand = (program2) => {
|
|
|
56683
57055
|
}
|
|
56684
57056
|
testCaseIds.push(tc.id);
|
|
56685
57057
|
}
|
|
56686
|
-
const [unassignError] = await catchError(testSetsApi.
|
|
57058
|
+
const [unassignError] = await catchError(testSetsApi.testSetsUnAssignTestCases({
|
|
56687
57059
|
id: testSet.id,
|
|
56688
57060
|
projectId,
|
|
56689
|
-
testCaseIds
|
|
57061
|
+
requestBody: testCaseIds
|
|
56690
57062
|
}));
|
|
56691
57063
|
if (unassignError) {
|
|
56692
57064
|
const { message, details } = await extractErrorDetails2(unassignError, { forbiddenMessage: TM_FORBIDDEN_MESSAGE });
|
|
@@ -57059,6 +57431,38 @@ var registerTestcaselogCommand = (program2) => {
|
|
|
57059
57431
|
// src/commands/testset.ts
|
|
57060
57432
|
init_src();
|
|
57061
57433
|
|
|
57434
|
+
// src/utils/playwright-projects.ts
|
|
57435
|
+
class PlaywrightSelectionUnsupportedError extends Error {
|
|
57436
|
+
constructor(message) {
|
|
57437
|
+
super(message);
|
|
57438
|
+
this.name = "PlaywrightSelectionUnsupportedError";
|
|
57439
|
+
}
|
|
57440
|
+
}
|
|
57441
|
+
var isClientError = (error) => error instanceof ResponseError && error.response.status >= 400 && error.response.status < 500;
|
|
57442
|
+
async function getPlaywrightProjectContext(testSetsApi, projectId, testSetId, testSetKey) {
|
|
57443
|
+
try {
|
|
57444
|
+
return await testSetsApi.testSetsGetPlaywrightProjectContext(toPlaywrightProjectContextRequest(projectId, testSetId));
|
|
57445
|
+
} catch (error) {
|
|
57446
|
+
if (isClientError(error)) {
|
|
57447
|
+
throw new PlaywrightSelectionUnsupportedError(`Could not read the Playwright context of test set '${testSetKey}' (HTTP ${error.response.status}). This needs a Test Manager with Playwright support enabled.`);
|
|
57448
|
+
}
|
|
57449
|
+
throw error;
|
|
57450
|
+
}
|
|
57451
|
+
}
|
|
57452
|
+
var isPlaywrightContext = (context) => Boolean(context.packageIdentifier && context.version);
|
|
57453
|
+
async function applyPlaywrightProjectSelection(testSetsApi, projectId, testSetId, testSetKey, requestedProjects) {
|
|
57454
|
+
const context = await getPlaywrightProjectContext(testSetsApi, projectId, testSetId, testSetKey);
|
|
57455
|
+
if (!isPlaywrightContext(context)) {
|
|
57456
|
+
throw new PlaywrightSelectionUnsupportedError(`Test set '${testSetKey}' does not resolve to a single Playwright package — --playwright-projects needs every test case in the test set to come from one Playwright package.`);
|
|
57457
|
+
}
|
|
57458
|
+
const available = context.availablePlaywrightProjects ?? [];
|
|
57459
|
+
const unknown = requestedProjects.filter((p) => !available.includes(p));
|
|
57460
|
+
if (unknown.length > 0) {
|
|
57461
|
+
throw new PlaywrightSelectionUnsupportedError(`Unknown Playwright project(s) for test set '${testSetKey}': ${unknown.join(", ")}. Available projects: ${available.length > 0 ? available.join(", ") : "(none)"}.`);
|
|
57462
|
+
}
|
|
57463
|
+
await testSetsApi.testSetsUpdateTestSetPackages(toUpdateTestSetPackagesRequest(projectId, testSetId, context.packageIdentifier, context.version, requestedProjects));
|
|
57464
|
+
}
|
|
57465
|
+
|
|
57062
57466
|
// src/utils/response.ts
|
|
57063
57467
|
async function parseJsonResponse(response) {
|
|
57064
57468
|
const contentType = response.headers.get("content-type");
|
|
@@ -57260,6 +57664,53 @@ var TESTSET_LIST_EXAMPLES = [
|
|
|
57260
57664
|
}
|
|
57261
57665
|
}
|
|
57262
57666
|
];
|
|
57667
|
+
async function resolveTestSetForCommand(options) {
|
|
57668
|
+
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
57669
|
+
if (authError) {
|
|
57670
|
+
OutputFormatter.error({
|
|
57671
|
+
Result: RESULTS.Failure,
|
|
57672
|
+
Message: authError.message,
|
|
57673
|
+
Instructions: instructionsFor("auth")
|
|
57674
|
+
});
|
|
57675
|
+
processContext.exit(1);
|
|
57676
|
+
return;
|
|
57677
|
+
}
|
|
57678
|
+
if (!ctx)
|
|
57679
|
+
return;
|
|
57680
|
+
const { tmConfig, projectId } = ctx;
|
|
57681
|
+
const testSetsApi = new TestSetsApi(tmConfig);
|
|
57682
|
+
const testSetKey = options.testSetKey;
|
|
57683
|
+
const [error, testSet] = await catchError(testSetsApi.testSetsGetTestSetByObjKeyAndProjectId({
|
|
57684
|
+
objKey: testSetKey,
|
|
57685
|
+
projectId
|
|
57686
|
+
}));
|
|
57687
|
+
if (error) {
|
|
57688
|
+
const { message, details } = await extractErrorDetails2(error, {
|
|
57689
|
+
forbiddenMessage: TM_FORBIDDEN_MESSAGE
|
|
57690
|
+
});
|
|
57691
|
+
OutputFormatter.error({
|
|
57692
|
+
Result: RESULTS.Failure,
|
|
57693
|
+
Message: message,
|
|
57694
|
+
Instructions: details
|
|
57695
|
+
});
|
|
57696
|
+
processContext.exit(1);
|
|
57697
|
+
return;
|
|
57698
|
+
}
|
|
57699
|
+
if (!testSet.id) {
|
|
57700
|
+
OutputFormatter.error({
|
|
57701
|
+
Result: RESULTS.Failure,
|
|
57702
|
+
Message: `Test set '${testSetKey}' not found.`
|
|
57703
|
+
});
|
|
57704
|
+
processContext.exit(1);
|
|
57705
|
+
return;
|
|
57706
|
+
}
|
|
57707
|
+
return {
|
|
57708
|
+
testSetsApi,
|
|
57709
|
+
projectId,
|
|
57710
|
+
testSet: { id: testSet.id },
|
|
57711
|
+
testSetKey
|
|
57712
|
+
};
|
|
57713
|
+
}
|
|
57263
57714
|
var registerTestsetCommand = (program2) => {
|
|
57264
57715
|
const testsetCmd = program2.command("testsets").description("Manage Test Manager test sets");
|
|
57265
57716
|
testsetCmd.command("create").description("Create a new test set in a Test Manager project.").requiredOption("--project-key <key>", "Test Manager project key (e.g. DEMO)").requiredOption("--name <name>", "Name of the test set").option("--description <text>", "Description for the test set").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTSET_CREATE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
@@ -57530,6 +57981,36 @@ var registerTestsetCommand = (program2) => {
|
|
|
57530
57981
|
}));
|
|
57531
57982
|
OutputFormatter.success(new SuccessOutput("TestSetTestCasesList", rows));
|
|
57532
57983
|
});
|
|
57984
|
+
testsetCmd.command("playwright-context", { hidden: true }).description("Show the Playwright context of a test set: whether it resolves to a single Playwright package and which Playwright projects are available/selected.").requiredOption("--test-set-key <key>", "Test set object key (e.g. DEMO:42)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").trackedAction(processContext, async (options) => {
|
|
57985
|
+
const resolved = await resolveTestSetForCommand(options);
|
|
57986
|
+
if (!resolved)
|
|
57987
|
+
return;
|
|
57988
|
+
const { testSetsApi, projectId, testSet, testSetKey } = resolved;
|
|
57989
|
+
const [contextError, context] = await catchError(getPlaywrightProjectContext(testSetsApi, projectId, testSet.id, testSetKey));
|
|
57990
|
+
if (contextError) {
|
|
57991
|
+
OutputFormatter.error({
|
|
57992
|
+
Result: RESULTS.Failure,
|
|
57993
|
+
Message: contextError.message
|
|
57994
|
+
});
|
|
57995
|
+
processContext.exit(1);
|
|
57996
|
+
return;
|
|
57997
|
+
}
|
|
57998
|
+
if (!context)
|
|
57999
|
+
return;
|
|
58000
|
+
const playwright = isPlaywrightContext(context);
|
|
58001
|
+
OutputFormatter.success(new SuccessOutput("TestSetPlaywrightContext", {
|
|
58002
|
+
TestSetKey: testSetKey,
|
|
58003
|
+
IsPlaywright: playwright,
|
|
58004
|
+
...playwright ? {
|
|
58005
|
+
PackageIdentifier: context.packageIdentifier,
|
|
58006
|
+
Version: context.version,
|
|
58007
|
+
AvailablePlaywrightProjects: (context.availablePlaywrightProjects ?? []).join(", "),
|
|
58008
|
+
SelectedPlaywrightProjects: (context.selectedPlaywrightProjects ?? []).join(", ")
|
|
58009
|
+
} : {
|
|
58010
|
+
Details: "Not a Playwright test set (RPA, mixed, manual, or no single package). Run it without --playwright-projects."
|
|
58011
|
+
}
|
|
58012
|
+
}));
|
|
58013
|
+
});
|
|
57533
58014
|
testsetCmd.command("run").description("Run a test set and return the execution ID.").requiredOption("--test-set-key <key>", "Test set object key (e.g. DEMO:42). The project key is derived from the prefix (e.g. DEMO).").option("--execution-type <type>", [
|
|
57534
58015
|
"Type of test cases to execute.",
|
|
57535
58016
|
" automated - run only automated test cases (default)",
|
|
@@ -57537,7 +58018,17 @@ var registerTestsetCommand = (program2) => {
|
|
|
57537
58018
|
" mixed - run both automated and manual test cases",
|
|
57538
58019
|
" none - no specific type filter"
|
|
57539
58020
|
].join(`
|
|
57540
|
-
`), "automated").option("--input-path <file>", 'JSON file with parameter overrides: [{"name":"Param","type":"String","value":"v"}]').addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").option("--wait", "Block until the execution reaches a terminal state (finished, cancelled)").option("--timeout <seconds>", "Maximum seconds to wait (0 = no timeout). Requires --wait.", String(DEFAULT_TIMEOUT_MS2 / 1000)).option("--poll-interval <seconds>", "Seconds between status checks. Requires --wait.", String(DEFAULT_INTERVAL_MS / 1000)).examples(TESTSET_EXECUTE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
58021
|
+
`), "automated").option("--input-path <file>", 'JSON file with parameter overrides: [{"name":"Param","type":"String","value":"v"}]').addOption(new Option("--playwright-projects <names...>", "PLAYWRIGHT ONLY. Playwright project names to run, space-separated (as defined in the package's playwright.config, e.g. chromium firefox). Only valid when every test case in the test set comes from one single Playwright package (packed with 'tm pack --type playwright'); fails for UiPath Studio/RPA test sets. Names are validated against the package's Playwright projects before anything is persisted; an unknown name fails fast listing the available ones (see 'tm testsets playwright-context'). The selection is saved on the test set and applies to later runs too. Omit to run with the package's playwright.config defaults.").hideHelp()).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").option("--wait", "Block until the execution reaches a terminal state (finished, cancelled)").option("--timeout <seconds>", "Maximum seconds to wait (0 = no timeout). Requires --wait.", String(DEFAULT_TIMEOUT_MS2 / 1000)).option("--poll-interval <seconds>", "Seconds between status checks. Requires --wait.", String(DEFAULT_INTERVAL_MS / 1000)).examples(TESTSET_EXECUTE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
58022
|
+
const requestedProjects = (options.playwrightProjects ?? []).map((p) => p.trim()).filter(Boolean);
|
|
58023
|
+
if (options.playwrightProjects && requestedProjects.length === 0) {
|
|
58024
|
+
OutputFormatter.error({
|
|
58025
|
+
Result: RESULTS.Failure,
|
|
58026
|
+
Message: "--playwright-projects was passed empty.",
|
|
58027
|
+
Instructions: "Pass at least one Playwright project name, space-separated, e.g. --playwright-projects chromium firefox."
|
|
58028
|
+
});
|
|
58029
|
+
processContext.exit(1);
|
|
58030
|
+
return;
|
|
58031
|
+
}
|
|
57541
58032
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
57542
58033
|
if (authError) {
|
|
57543
58034
|
OutputFormatter.error({
|
|
@@ -57609,6 +58100,19 @@ var registerTestsetCommand = (program2) => {
|
|
|
57609
58100
|
processContext.exit(1);
|
|
57610
58101
|
return;
|
|
57611
58102
|
}
|
|
58103
|
+
if (requestedProjects.length > 0) {
|
|
58104
|
+
const [selectError] = await catchError(applyPlaywrightProjectSelection(testSetsApi, projectId, testSet.id, testSetKey, requestedProjects));
|
|
58105
|
+
if (selectError) {
|
|
58106
|
+
OutputFormatter.error({
|
|
58107
|
+
Result: RESULTS.Failure,
|
|
58108
|
+
Message: selectError.message,
|
|
58109
|
+
Instructions: selectError instanceof PlaywrightSelectionUnsupportedError ? "Playwright project selection needs a Test Manager with Playwright support enabled and a test set whose test cases all come from one Playwright package. Re-run without --playwright-projects to use the package's playwright.config defaults." : "Re-run without --playwright-projects to use the package's playwright.config defaults, or fix the selection and retry."
|
|
58110
|
+
});
|
|
58111
|
+
processContext.exit(1);
|
|
58112
|
+
return;
|
|
58113
|
+
}
|
|
58114
|
+
logger.info(`Playwright project selection applied: ${requestedProjects.join(", ")}`);
|
|
58115
|
+
}
|
|
57612
58116
|
if (options.inputPath) {
|
|
57613
58117
|
const [overrideError] = await catchError(overrideTestSetParameters(tmConfig, projectId, testSet.id, options.inputPath));
|
|
57614
58118
|
if (overrideError) {
|
|
@@ -58069,4 +58573,4 @@ export {
|
|
|
58069
58573
|
metadata
|
|
58070
58574
|
};
|
|
58071
58575
|
|
|
58072
|
-
//# debugId=
|
|
58576
|
+
//# debugId=3A0797EFB31A670764756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/test-manager-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.199.0
|
|
4
|
+
"version": "1.199.0",
|
|
5
5
|
"description": "Manage test cases, test sets, executions, and results.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "723e6801b77b5926ba75e75b6a756cc38b1b7adc"
|
|
30
30
|
}
|