testit-adapter-jest 5.0.6 → 5.0.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 +2 -1
- package/dist/testitEnvironment.d.ts +4 -0
- package/dist/testitEnvironment.js +9 -0
- package/package.json +2 -2
- package/types.d.ts +4 -0
package/README.md
CHANGED
|
@@ -123,7 +123,8 @@ $ npx jest -t "$(cat tmp/filter.txt)"
|
|
|
123
123
|
Methods can be used to specify information about autotest.
|
|
124
124
|
|
|
125
125
|
Description of metadata methods:
|
|
126
|
-
- `testit.
|
|
126
|
+
- `testit.workItemId` - a method that links an autotest with a manual test. Receives a single globalId
|
|
127
|
+
- `testit.workItemIds` - deprecated, use `testit.workItemId` instead
|
|
127
128
|
- `testit.displayName` - internal autotest name (used in Test IT)
|
|
128
129
|
- `testit.externalId` - unique internal autotest ID (used in Test IT)
|
|
129
130
|
- `testit.title` - autotest name specified in the autotest card. If not specified, the name from the displayName method is used
|
|
@@ -64,6 +64,10 @@ export default class TestItEnvironment extends NodeEnvironment {
|
|
|
64
64
|
setLabels(labels: string[]): void;
|
|
65
65
|
setLayer(layer: string): void;
|
|
66
66
|
setTags(tags: string[]): void;
|
|
67
|
+
setWorkItemId(globalId: string): void;
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Use workItemId with a single globalId instead.
|
|
70
|
+
*/
|
|
67
71
|
setWorkItems(workItems: string[]): void;
|
|
68
72
|
setParams(params: any): void;
|
|
69
73
|
setNameSpace(nameSpace: string): void;
|
|
@@ -96,6 +96,7 @@ class TestItEnvironment extends jest_environment_node_1.default {
|
|
|
96
96
|
labels: this.setLabels.bind(this),
|
|
97
97
|
layer: this.setLayer.bind(this),
|
|
98
98
|
tags: this.setTags.bind(this),
|
|
99
|
+
workItemId: this.setWorkItemId.bind(this),
|
|
99
100
|
workItemIds: this.setWorkItems.bind(this),
|
|
100
101
|
params: this.setParams.bind(this),
|
|
101
102
|
step: this.startStep.bind(this),
|
|
@@ -488,7 +489,15 @@ class TestItEnvironment extends jest_environment_node_1.default {
|
|
|
488
489
|
log("Setting tags to %s", this.autotestData.name);
|
|
489
490
|
this.autotestData.tags = tags;
|
|
490
491
|
}
|
|
492
|
+
setWorkItemId(globalId) {
|
|
493
|
+
log("Setting work item id to %s", this.autotestData.name);
|
|
494
|
+
this.autotestData.workItemIds = [globalId];
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* @deprecated Use workItemId with a single globalId instead.
|
|
498
|
+
*/
|
|
491
499
|
setWorkItems(workItems) {
|
|
500
|
+
testit_js_commons_2.logger.warn("workItemIds is deprecated. Use workItemId with a single globalId instead.");
|
|
492
501
|
log("Setting work items to %s", this.autotestData.name);
|
|
493
502
|
this.autotestData.workItemIds = workItems;
|
|
494
503
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testit-adapter-jest",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.7",
|
|
4
4
|
"description": "Jest adapter for Test IT",
|
|
5
5
|
"main": "dist/testitEnvironment.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"debug": "^4.3.4",
|
|
19
|
-
"testit-js-commons": "5.0.
|
|
19
|
+
"testit-js-commons": "5.0.7"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/debug": "^4.1.7",
|
package/types.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ declare global {
|
|
|
8
8
|
labels(labels: string[]): void;
|
|
9
9
|
layer(layer: string): void;
|
|
10
10
|
tags(tags: string[]): void;
|
|
11
|
+
workItemId(globalId: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use workItemId with a single globalId instead.
|
|
14
|
+
*/
|
|
11
15
|
workItemIds(workItemsIds: string[]): void;
|
|
12
16
|
params(params: any): void;
|
|
13
17
|
step(name: string, description?: string): void;
|