@smartbear/mcp 0.19.0 → 0.19.2
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/package.json.js
CHANGED
|
@@ -411,10 +411,7 @@ const UpdateTestCaseBody = zod.object({
|
|
|
411
411
|
precondition: zod.string().nullish().describe("Any conditions that need to be met."),
|
|
412
412
|
estimatedTime: zod.number().min(updateTestCaseBodyEstimatedTimeMin).nullish().describe("Estimated duration in milliseconds."),
|
|
413
413
|
labels: zod.array(zod.string()).max(updateTestCaseBodyLabelsMax).optional().describe("Array of labels associated to this entity."),
|
|
414
|
-
component: zod.
|
|
415
|
-
id: zod.number().min(1).describe("The ID of the entity"),
|
|
416
|
-
self: zod.string().url().optional().describe("The REST API endpoint to get more resource details.")
|
|
417
|
-
}).strict().nullish().describe("ID and link to the Jira component resource."),
|
|
414
|
+
component: zod.number().min(1).nullable().optional().describe("ID and link to the Jira component resource."),
|
|
418
415
|
priority: zod.object({
|
|
419
416
|
id: zod.number().min(1).describe("The ID of the entity"),
|
|
420
417
|
self: zod.string().url().optional().describe("The REST API endpoint to get more resource details.")
|
|
@@ -423,16 +420,10 @@ const UpdateTestCaseBody = zod.object({
|
|
|
423
420
|
id: zod.number().min(1).describe("The ID of the entity"),
|
|
424
421
|
self: zod.string().url().optional().describe("The REST API endpoint to get more resource details.")
|
|
425
422
|
}).strict().describe("ID and link to the status resource."),
|
|
426
|
-
folder: zod.
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
owner: zod.object({
|
|
431
|
-
accountId: zod.string().regex(updateTestCaseBodyOwnerAccountIdRegExp).nullable().describe("Atlassian Account ID of the Jira user."),
|
|
432
|
-
self: zod.string().url().optional().describe(
|
|
433
|
-
"The Jira REST API endpoint to get the full representation of the Jira user."
|
|
434
|
-
)
|
|
435
|
-
}).strict().nullish(),
|
|
423
|
+
folder: zod.number().min(1).nullable().optional().describe(
|
|
424
|
+
"The ID of the folder, to remove folder set it's value to null"
|
|
425
|
+
),
|
|
426
|
+
owner: zod.string().regex(updateTestCaseBodyOwnerAccountIdRegExp).nullable().describe("Atlassian Account ID of the Jira user."),
|
|
436
427
|
customFields: zod.record(zod.string(), zod.unknown()).optional().describe(
|
|
437
428
|
"Multi-line text fields support HTML and should denote new lines with the \\<br\\> tag.\nDates should be in the format 'yyyy-MM-dd'.\nUsers should have values of Jira User Account IDs.\n"
|
|
438
429
|
)
|
|
@@ -1110,20 +1101,14 @@ const UpdateTestCycleBody = zod.object({
|
|
|
1110
1101
|
id: zod.number().min(1).describe("The ID of the entity"),
|
|
1111
1102
|
self: zod.string().url().optional().describe("The REST API endpoint to get more resource details.")
|
|
1112
1103
|
}).strict().describe("ID and link relative to Zephyr project."),
|
|
1113
|
-
jiraProjectVersion: zod.
|
|
1114
|
-
id: zod.number().min(1).describe("The ID of the entity"),
|
|
1115
|
-
self: zod.string().url().optional().describe("The REST API endpoint to get more resource details.")
|
|
1116
|
-
}).strict().nullish().describe(
|
|
1104
|
+
jiraProjectVersion: zod.number().min(1).nullable().optional().describe(
|
|
1117
1105
|
"ID and Link to fetch information about Jira Project version. Relates to 'Version' or 'Releases' in Jira projects."
|
|
1118
1106
|
),
|
|
1119
1107
|
status: zod.object({
|
|
1120
1108
|
id: zod.number().min(1).describe("The ID of the entity"),
|
|
1121
1109
|
self: zod.string().url().optional().describe("The REST API endpoint to get more resource details.")
|
|
1122
1110
|
}).strict().describe("ID and link to the status resource."),
|
|
1123
|
-
folder: zod.
|
|
1124
|
-
id: zod.number().min(1).describe("The ID of the entity"),
|
|
1125
|
-
self: zod.string().url().optional().describe("The REST API endpoint to get more resource details.")
|
|
1126
|
-
}).strict().nullish().describe("ID and link to the folder resource."),
|
|
1111
|
+
folder: zod.number().min(1).nullable().optional().describe("ID and link to the folder resource."),
|
|
1127
1112
|
description: zod.string().nullish().describe("Description outlining the scope."),
|
|
1128
1113
|
plannedStartDate: zod.string().datetime({}).nullish().describe(
|
|
1129
1114
|
"Planned start date of the test cycle. This field cannot be blank. Setting it as null or excluding it from the request will leave the field values unchanged. ISO 8601 Format (i.e., yyyy-MM-dd'T'HH:mm:ss'Z')"
|
|
@@ -1131,12 +1116,7 @@ const UpdateTestCycleBody = zod.object({
|
|
|
1131
1116
|
plannedEndDate: zod.string().datetime({}).nullish().describe(
|
|
1132
1117
|
"The planned end date of the test cycle. This field cannot be blank. Setting it as null or excluding it from the request will leave the field values unchanged. ISO 8601 Format (i.e., yyyy-MM-dd'T'HH:mm:ss'Z')"
|
|
1133
1118
|
),
|
|
1134
|
-
owner: zod.
|
|
1135
|
-
accountId: zod.string().regex(updateTestCycleBodyOwnerAccountIdRegExp).nullable().describe("Atlassian Account ID of the Jira user."),
|
|
1136
|
-
self: zod.string().url().optional().describe(
|
|
1137
|
-
"The Jira REST API endpoint to get the full representation of the Jira user."
|
|
1138
|
-
)
|
|
1139
|
-
}).strict().nullish(),
|
|
1119
|
+
owner: zod.string().regex(updateTestCycleBodyOwnerAccountIdRegExp).nullable().describe("Atlassian Account ID of the Jira user."),
|
|
1140
1120
|
customFields: zod.record(zod.string(), zod.unknown()).optional().describe(
|
|
1141
1121
|
"Multi-line text fields support HTML and should denote new lines with the \\<br\\> tag.\nDates should be in the format 'yyyy-MM-dd'.\nUsers should have values of Jira User Account IDs.\n"
|
|
1142
1122
|
)
|
|
@@ -57,6 +57,14 @@ class UpdateTestCase extends Tool {
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
expectedOutput: "The test case should be updated, but no output is expected."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
description: "Remove test case from folder",
|
|
63
|
+
parameters: {
|
|
64
|
+
testCaseKey: "SA-T15",
|
|
65
|
+
folder: null
|
|
66
|
+
},
|
|
67
|
+
expectedOutput: "The test case should be updated, but no output is expected."
|
|
60
68
|
}
|
|
61
69
|
]
|
|
62
70
|
};
|
|
@@ -64,7 +72,21 @@ class UpdateTestCase extends Tool {
|
|
|
64
72
|
const parsed = UpdateTestCaseParams.and(UpdateTestCaseBody.partial()).parse(
|
|
65
73
|
args
|
|
66
74
|
);
|
|
67
|
-
const { testCaseKey, ...
|
|
75
|
+
const { testCaseKey, ...rawUpdates } = parsed;
|
|
76
|
+
const nullValuesObject = {};
|
|
77
|
+
if (rawUpdates.folder) {
|
|
78
|
+
nullValuesObject.folder = { id: rawUpdates.folder };
|
|
79
|
+
}
|
|
80
|
+
if (rawUpdates.owner) {
|
|
81
|
+
nullValuesObject.owner = { accountId: rawUpdates.owner };
|
|
82
|
+
}
|
|
83
|
+
if (rawUpdates.component) {
|
|
84
|
+
nullValuesObject.component = { id: rawUpdates.component };
|
|
85
|
+
}
|
|
86
|
+
const updates = {
|
|
87
|
+
...rawUpdates,
|
|
88
|
+
...nullValuesObject
|
|
89
|
+
};
|
|
68
90
|
const existingTestCase = await this.client.getApiClient().get(`/testcases/${testCaseKey}`);
|
|
69
91
|
const mergedBody = deepMerge(existingTestCase, updates);
|
|
70
92
|
delete mergedBody.createdOn;
|
|
@@ -72,8 +72,23 @@ class UpdateTestCycle extends Tool {
|
|
|
72
72
|
const parsed = UpdateTestCycleParams.and(
|
|
73
73
|
UpdateTestCycleBody.partial()
|
|
74
74
|
).parse(args);
|
|
75
|
-
const { testCycleIdOrKey, ...
|
|
76
|
-
const
|
|
75
|
+
const { testCycleIdOrKey, ...rawUpdates } = parsed;
|
|
76
|
+
const nullValuesObject = {};
|
|
77
|
+
if (rawUpdates.folder) {
|
|
78
|
+
nullValuesObject.folder = { id: rawUpdates.folder };
|
|
79
|
+
}
|
|
80
|
+
if (rawUpdates.owner) {
|
|
81
|
+
nullValuesObject.owner = { accountId: rawUpdates.owner };
|
|
82
|
+
}
|
|
83
|
+
if (rawUpdates.jiraProjectVersion) {
|
|
84
|
+
nullValuesObject.jiraProjectVersion = {
|
|
85
|
+
id: rawUpdates.jiraProjectVersion
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
const updates = {
|
|
89
|
+
...rawUpdates,
|
|
90
|
+
...nullValuesObject
|
|
91
|
+
};
|
|
77
92
|
if (updates.plannedStartDate === null) delete updates.plannedStartDate;
|
|
78
93
|
if (updates.plannedEndDate === null) delete updates.plannedEndDate;
|
|
79
94
|
const existingTestCycle = await this.client.getApiClient().get(`/testcycles/${testCycleIdOrKey}`);
|