testcafe-reporter-testit 5.0.5 → 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 +6 -3
- package/lib/converter.js +1 -0
- package/lib/metadata.d.ts +1 -0
- package/lib/metadata.js +12 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -98,12 +98,14 @@ Methods and properties can be used to specify information about autotest.
|
|
|
98
98
|
### Properties
|
|
99
99
|
|
|
100
100
|
Description of metadata properties:
|
|
101
|
-
- `
|
|
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
|
|
105
106
|
- `description` - autotest description specified in the autotest card
|
|
106
107
|
- `labels` - labels listed in the autotest card
|
|
108
|
+
- `layer` - test pyramid layer in the autotest card (source **Run**). Use `TestLayers` from `testit-js-commons` for recommended values, or any custom string
|
|
107
109
|
- `tags` - tags listed in the autotest card
|
|
108
110
|
- `links` - links listed in the autotest card
|
|
109
111
|
- `nameSpace` - directory in the TMS system (default - directory's name of test)
|
|
@@ -124,7 +126,7 @@ Description of methods:
|
|
|
124
126
|
// annotations.spec.ts
|
|
125
127
|
const adapter = require('testcafe-reporter-testit')();
|
|
126
128
|
import { Selector } from 'testcafe';
|
|
127
|
-
import { Link } from 'testit-js-commons';
|
|
129
|
+
import { Link, TestLayers } from 'testit-js-commons';
|
|
128
130
|
import { join } from "path";
|
|
129
131
|
|
|
130
132
|
fixture('TestCafé Example Fixture - Documentation').page('http://devexpress.github.io/testcafe/example');
|
|
@@ -146,8 +148,9 @@ test.meta({
|
|
|
146
148
|
title: 'title',
|
|
147
149
|
namespace: 'namespace',
|
|
148
150
|
classname: 'classname',
|
|
149
|
-
|
|
151
|
+
workItemId: '123',
|
|
150
152
|
labels: ['label1', 'label2'],
|
|
153
|
+
layer: TestLayers.API,
|
|
151
154
|
tags: ['tag1', 'tag2'],
|
|
152
155
|
})('test', async t => {
|
|
153
156
|
adapter.addMessage(t, "Message");
|
package/lib/converter.js
CHANGED
|
@@ -20,6 +20,7 @@ class Converter {
|
|
|
20
20
|
title: autotestData.title,
|
|
21
21
|
description: autotestData.description,
|
|
22
22
|
labels: autotestData.labels?.map((label) => ({ name: label })),
|
|
23
|
+
layer: autotestData.layer,
|
|
23
24
|
tags: autotestData.tags,
|
|
24
25
|
links: autotestData.links,
|
|
25
26
|
namespace: autotestData.namespace,
|
package/lib/metadata.d.ts
CHANGED
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, 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
|
}
|
|
@@ -36,16 +36,24 @@ class Metadata {
|
|
|
36
36
|
else if (this.isString(labels)) {
|
|
37
37
|
this.labels = [labels];
|
|
38
38
|
}
|
|
39
|
+
if (this.isString(layer)) {
|
|
40
|
+
this.layer = layer;
|
|
41
|
+
}
|
|
39
42
|
if (Array.isArray(tags)) {
|
|
40
43
|
this.tags = tags;
|
|
41
44
|
}
|
|
42
45
|
else if (this.isString(tags)) {
|
|
43
46
|
this.tags = [tags];
|
|
44
47
|
}
|
|
48
|
+
if (this.isString(workItemId)) {
|
|
49
|
+
this.workItemIds = [workItemId];
|
|
50
|
+
}
|
|
45
51
|
if (Array.isArray(workItemIds)) {
|
|
52
|
+
testit_js_commons_1.logger.warn("workItemIds is deprecated. Use workItemId with a single globalId instead.");
|
|
46
53
|
this.workItemIds = workItemIds;
|
|
47
54
|
}
|
|
48
55
|
else if (this.isString(workItemIds)) {
|
|
56
|
+
testit_js_commons_1.logger.warn("workItemIds is deprecated. Use workItemId with a single globalId instead.");
|
|
49
57
|
this.workItemIds = [workItemIds];
|
|
50
58
|
}
|
|
51
59
|
if (this.isString(namespace)) {
|
|
@@ -80,6 +88,9 @@ class Metadata {
|
|
|
80
88
|
if (!this.labels && metadata.labels) {
|
|
81
89
|
this.labels = metadata.labels;
|
|
82
90
|
}
|
|
91
|
+
if (!this.layer && metadata.layer) {
|
|
92
|
+
this.layer = metadata.layer;
|
|
93
|
+
}
|
|
83
94
|
if (!this.tags && metadata.tags) {
|
|
84
95
|
this.tags = metadata.tags;
|
|
85
96
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testcafe-reporter-testit",
|
|
3
|
-
"version": "5.0.
|
|
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.
|
|
46
|
+
"testit-js-commons": "5.0.7"
|
|
47
47
|
}
|
|
48
48
|
}
|