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 CHANGED
@@ -141,7 +141,7 @@ npm run dev
141
141
  ```
142
142
 
143
143
  **Test Types:**
144
- - `Manual` - Manual tests (automatically mapped to Unstructured in Xray for compatibility with `add_manual_test_steps`)
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
@@ -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: xrayTestType
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 as a string for Xray's unstructured test definition
220
- // Format: "1. Action|Data|Result\n2. Action|Data|Result"
221
- const unstructuredSteps = steps
222
- .map((step, index) => {
223
- const stepNumber = index + 1;
224
- const parts = [step.action];
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 UpdateUnstructuredTest($issueId: String!, $unstructured: String!) {
234
- updateUnstructuredTestDefinition(issueId: $issueId, unstructured: $unstructured) {
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
- unstructured: unstructuredSteps
233
+ steps: manualSteps
243
234
  };
244
235
  await this.graphqlRequest(mutation, variables);
245
236
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xray-mcp",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {