@msalaam/xray-qe-toolkit 1.6.1 → 1.6.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.
Files changed (2) hide show
  1. package/lib/xrayClient.js +12 -9
  2. package/package.json +1 -1
package/lib/xrayClient.js CHANGED
@@ -686,28 +686,31 @@ export async function removeTestsFromTestPlanById(cfg, xrayToken, planIssueId, t
686
686
  /**
687
687
  * Create a new Test Set issue via Xray GraphQL.
688
688
  *
689
- * Test Sets are persistent groupings of tests by feature/area.
690
- * They live across sprints Test Plans reference Test Sets per sprint.
689
+ * Xray Cloud's createTestSet mutation accepts a `jira` JSON argument
690
+ * containing the standard JIRA fields object (same shape as JIRA REST API).
691
691
  *
692
692
  * @param {object} cfg
693
693
  * @param {string} xrayToken
694
- * @param {object} opts { summary, projectId? }
695
- * @returns {Promise<{testSet: {issueId: string, projectId: string}, warnings: string[]}>}
694
+ * @param {object} opts { summary, projectKey? }
695
+ * @returns {Promise<{testSet: {issueId: string}, warnings: string[]}>}
696
696
  */
697
697
  export async function createTestSet(cfg, xrayToken, opts) {
698
698
  const data = await graphql(cfg, xrayToken, `
699
- mutation ($projectId: String!, $summary: String!) {
700
- createTestSet(projectId: $projectId, summary: $summary) {
699
+ mutation ($jira: JSON!) {
700
+ createTestSet(jira: $jira) {
701
701
  testSet {
702
702
  issueId
703
- projectId
704
703
  }
705
704
  warnings
706
705
  }
707
706
  }
708
707
  `, {
709
- projectId: opts.projectId || cfg.jiraProjectKey,
710
- summary: opts.summary,
708
+ jira: {
709
+ fields: {
710
+ summary: opts.summary,
711
+ project: { key: opts.projectKey || cfg.jiraProjectKey },
712
+ },
713
+ },
711
714
  });
712
715
  return data.createTestSet;
713
716
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@msalaam/xray-qe-toolkit",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "QE toolkit for Xray Cloud — test management, tests.json standardisation, Playwright result import, and CI pipeline integration.",
5
5
  "type": "module",
6
6
  "bin": {