testcafe-reporter-testit 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 CHANGED
@@ -98,7 +98,8 @@ Methods and properties can be used to specify information about autotest.
98
98
  ### Properties
99
99
 
100
100
  Description of metadata properties:
101
- - `workItemIds` - a method that links autotests with manual tests. Receives the array of manual tests' IDs
101
+ - `workItemId` - a method that links an autotest with a manual test. Receives a single globalId
102
+ - `workItemIds` - deprecated, use `workItemId` instead
102
103
  - `displayName` - internal autotest name (used in Test IT)
103
104
  - `externalId` - unique internal autotest ID (used in Test IT)
104
105
  - `title` - autotest name specified in the autotest card. If not specified, the name from the displayName method is used
@@ -147,7 +148,7 @@ test.meta({
147
148
  title: 'title',
148
149
  namespace: 'namespace',
149
150
  classname: 'classname',
150
- workItemIds: ['123', '321'],
151
+ workItemId: '123',
151
152
  labels: ['label1', 'label2'],
152
153
  layer: TestLayers.API,
153
154
  tags: ['tag1', 'tag2'],
package/lib/metadata.js CHANGED
@@ -5,7 +5,7 @@ class Metadata {
5
5
  constructor(meta, path, name) {
6
6
  this.otherMeta = new Map();
7
7
  if (meta) {
8
- const { externalId, displayName, title, description, links, labels, layer, tags, workItemIds, namespace, classname, ...otherMeta } = meta;
8
+ const { externalId, displayName, title, description, links, labels, layer, tags, workItemId, workItemIds, namespace, classname, ...otherMeta } = meta;
9
9
  if (this.isString(externalId)) {
10
10
  this.externalId = externalId;
11
11
  }
@@ -45,10 +45,15 @@ class Metadata {
45
45
  else if (this.isString(tags)) {
46
46
  this.tags = [tags];
47
47
  }
48
+ if (this.isString(workItemId)) {
49
+ this.workItemIds = [workItemId];
50
+ }
48
51
  if (Array.isArray(workItemIds)) {
52
+ testit_js_commons_1.logger.warn("workItemIds is deprecated. Use workItemId with a single globalId instead.");
49
53
  this.workItemIds = workItemIds;
50
54
  }
51
55
  else if (this.isString(workItemIds)) {
56
+ testit_js_commons_1.logger.warn("workItemIds is deprecated. Use workItemId with a single globalId instead.");
52
57
  this.workItemIds = [workItemIds];
53
58
  }
54
59
  if (this.isString(namespace)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testcafe-reporter-testit",
3
- "version": "5.0.6",
3
+ "version": "5.0.7",
4
4
  "description": "TestCafe adapter for Test IT",
5
5
  "keywords": [],
6
6
  "author": {
@@ -43,6 +43,6 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@types/minimatch": "^5.1.2",
46
- "testit-js-commons": "5.0.6"
46
+ "testit-js-commons": "5.0.7"
47
47
  }
48
48
  }