xray-mcp 1.2.6 → 1.2.7
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/README.md +1 -1
- package/dist/xray-client.js +10 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -141,7 +141,7 @@ npm run dev
|
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
**Test Types:**
|
|
144
|
-
- `Manual` - Manual tests
|
|
144
|
+
- `Manual` - Manual tests with structured steps (use with `add_manual_test_steps`)
|
|
145
145
|
- `Cucumber` - Gherkin/BDD scenarios
|
|
146
146
|
- `Generic` - Other test types
|
|
147
147
|
- `Generic` - Generic automated tests
|
package/dist/xray-client.js
CHANGED
|
@@ -147,10 +147,8 @@ export class XrayClient {
|
|
|
147
147
|
unstructured: testCase.description || ''
|
|
148
148
|
};
|
|
149
149
|
if (testCase.testType) {
|
|
150
|
-
// Always use "Unstructured" for Manual tests to ensure compatibility with add_manual_test_steps
|
|
151
|
-
const xrayTestType = testCase.testType === 'Manual' ? 'Unstructured' : testCase.testType;
|
|
152
150
|
variables.testType = {
|
|
153
|
-
name:
|
|
151
|
+
name: testCase.testType
|
|
154
152
|
};
|
|
155
153
|
}
|
|
156
154
|
const result = await this.graphqlRequest(mutation, variables);
|
|
@@ -216,22 +214,15 @@ export class XrayClient {
|
|
|
216
214
|
* @param steps - Array of test steps with action, data, and result
|
|
217
215
|
*/
|
|
218
216
|
async addManualTestSteps(issueId, steps) {
|
|
219
|
-
// Format steps
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
.
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
if (step.data) {
|
|
226
|
-
parts.push(step.data);
|
|
227
|
-
}
|
|
228
|
-
parts.push(step.result);
|
|
229
|
-
return `${stepNumber}. ${parts.join('|')}`;
|
|
230
|
-
})
|
|
231
|
-
.join('\n');
|
|
217
|
+
// Format steps for Manual test type
|
|
218
|
+
const manualSteps = steps.map((step) => ({
|
|
219
|
+
action: step.action,
|
|
220
|
+
data: step.data || '',
|
|
221
|
+
result: step.result
|
|
222
|
+
}));
|
|
232
223
|
const mutation = `
|
|
233
|
-
mutation
|
|
234
|
-
|
|
224
|
+
mutation UpdateManualTest($issueId: String!, $steps: [ManualTestStepInput]!) {
|
|
225
|
+
updateManualTestSteps(issueId: $issueId, steps: $steps) {
|
|
235
226
|
issueId
|
|
236
227
|
jira(fields: ["key"])
|
|
237
228
|
}
|
|
@@ -239,7 +230,7 @@ export class XrayClient {
|
|
|
239
230
|
`;
|
|
240
231
|
const variables = {
|
|
241
232
|
issueId: issueId,
|
|
242
|
-
|
|
233
|
+
steps: manualSteps
|
|
243
234
|
};
|
|
244
235
|
await this.graphqlRequest(mutation, variables);
|
|
245
236
|
}
|