@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.
- package/lib/xrayClient.js +12 -9
- 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
|
-
*
|
|
690
|
-
*
|
|
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,
|
|
695
|
-
* @returns {Promise<{testSet: {issueId: 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 ($
|
|
700
|
-
createTestSet(
|
|
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
|
-
|
|
710
|
-
|
|
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