testcafe-reporter-testit 5.0.5 → 5.0.6

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
@@ -104,6 +104,7 @@ Description of metadata properties:
104
104
  - `title` - autotest name specified in the autotest card. If not specified, the name from the displayName method is used
105
105
  - `description` - autotest description specified in the autotest card
106
106
  - `labels` - labels listed in the autotest card
107
+ - `layer` - test pyramid layer in the autotest card (source **Run**). Use `TestLayers` from `testit-js-commons` for recommended values, or any custom string
107
108
  - `tags` - tags listed in the autotest card
108
109
  - `links` - links listed in the autotest card
109
110
  - `nameSpace` - directory in the TMS system (default - directory's name of test)
@@ -124,7 +125,7 @@ Description of methods:
124
125
  // annotations.spec.ts
125
126
  const adapter = require('testcafe-reporter-testit')();
126
127
  import { Selector } from 'testcafe';
127
- import { Link } from 'testit-js-commons';
128
+ import { Link, TestLayers } from 'testit-js-commons';
128
129
  import { join } from "path";
129
130
 
130
131
  fixture('TestCafé Example Fixture - Documentation').page('http://devexpress.github.io/testcafe/example');
@@ -148,6 +149,7 @@ test.meta({
148
149
  classname: 'classname',
149
150
  workItemIds: ['123', '321'],
150
151
  labels: ['label1', 'label2'],
152
+ layer: TestLayers.API,
151
153
  tags: ['tag1', 'tag2'],
152
154
  })('test', async t => {
153
155
  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
@@ -6,6 +6,7 @@ export default class Metadata {
6
6
  description: string | undefined;
7
7
  links: Link[] | undefined;
8
8
  labels: string[] | undefined;
9
+ layer: string | undefined;
9
10
  tags: string[] | undefined;
10
11
  workItemIds: string[] | undefined;
11
12
  namespace: string | undefined;
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, workItemIds, namespace, classname, ...otherMeta } = meta;
9
9
  if (this.isString(externalId)) {
10
10
  this.externalId = externalId;
11
11
  }
@@ -36,6 +36,9 @@ 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
  }
@@ -80,6 +83,9 @@ class Metadata {
80
83
  if (!this.labels && metadata.labels) {
81
84
  this.labels = metadata.labels;
82
85
  }
86
+ if (!this.layer && metadata.layer) {
87
+ this.layer = metadata.layer;
88
+ }
83
89
  if (!this.tags && metadata.tags) {
84
90
  this.tags = metadata.tags;
85
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testcafe-reporter-testit",
3
- "version": "5.0.5",
3
+ "version": "5.0.6",
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.5"
46
+ "testit-js-commons": "5.0.6"
47
47
  }
48
48
  }