testit-adapter-cypress 5.0.7 → 5.0.8-TMS-5.8

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
@@ -137,13 +137,11 @@ first-job:
137
137
  Methods can be used to specify information about autotest.
138
138
 
139
139
  Description of methods:
140
- - `tms.addWorkItemId` - a dynamic method that links an autotest with a manual test. Receives a single globalId
141
- - `tms.addWorkItemIds` - deprecated, use `tms.addWorkItemId` instead
140
+ - `tms.addWorkItemIds` - a dynamic method that links autotests with manual tests. Receives the array of manual tests' IDs
142
141
  - `tms.addDisplayName` - a dynamic method for adding internal autotest name (used in Test IT)
143
142
  - `tms.addTitle` - a dynamic method for adding autotest name specified in the autotest card. If not specified, the name from the displayName method is used
144
143
  - `tms.addDescription` - a dynamic method for adding autotest description specified in the autotest card
145
144
  - `tms.addLabels` - a dynamic method for adding labels listed in the autotest card
146
- - `tms.addLayer` - test pyramid layer in the autotest card (source **Run**). Use `TestLayers` from `testit-js-commons` for recommended values, or any custom string
147
145
  - `tms.addTags` - a dynamic method for adding tags listed in the autotest card
148
146
  - `tms.addLinks` - links in the autotest result
149
147
  - `tms.addAttachments` - uploading files in the autotest result
@@ -158,18 +156,16 @@ Description of methods:
158
156
  #### Simple test
159
157
  ```ts
160
158
  import { getTestRuntime } from "testit-adapter-cypress/runtime";
161
- import { TestLayers } from "testit-js-commons";
162
159
 
163
160
  describe('example to-do app', () => {
164
161
  it('displays two todo items by default', () => {
165
162
  const tms = getTestRuntime();
166
163
 
167
- tms.addWorkItemId('123');
164
+ tms.addWorkItemIds('123', '321');
168
165
  tms.addDisplayName('display name');
169
166
  tms.addTitle('test title');
170
167
  tms.addDescription('Test description');
171
168
  tms.addLabels('label1', 'label2');
172
- tms.addLayer(TestLayers.API);
173
169
  tms.addTags('tag1', 'tag2');
174
170
  tms.addLinks(
175
171
  {
@@ -6,13 +6,8 @@ declare class TmsCypressTestRuntime implements TestRuntime {
6
6
  #private;
7
7
  constructor();
8
8
  addLabels(...labels: string[]): PromiseLike<void>;
9
- addLayer(layer: string): PromiseLike<void>;
10
9
  addTags(...tags: string[]): PromiseLike<void>;
11
10
  addLinks(...links: Link[]): PromiseLike<void>;
12
- addWorkItemId(globalId: string): PromiseLike<void>;
13
- /**
14
- * @deprecated Use addWorkItemId with a single globalId instead.
15
- */
16
11
  addWorkItemIds(...workItemIds: string[]): PromiseLike<void>;
17
12
  addParameter(name: string, value: string): PromiseLike<void>;
18
13
  addDescription(description: string): PromiseLike<void>;
@@ -27,14 +27,6 @@ class TmsCypressTestRuntime {
27
27
  },
28
28
  });
29
29
  }
30
- addLayer(layer) {
31
- return __classPrivateFieldGet(this, _TmsCypressTestRuntime_instances, "m", _TmsCypressTestRuntime_enqueueMessageAsync).call(this, {
32
- type: "metadata",
33
- data: {
34
- layer,
35
- },
36
- });
37
- }
38
30
  addTags(...tags) {
39
31
  return __classPrivateFieldGet(this, _TmsCypressTestRuntime_instances, "m", _TmsCypressTestRuntime_enqueueMessageAsync).call(this, {
40
32
  type: "metadata",
@@ -51,19 +43,7 @@ class TmsCypressTestRuntime {
51
43
  },
52
44
  });
53
45
  }
54
- addWorkItemId(globalId) {
55
- return __classPrivateFieldGet(this, _TmsCypressTestRuntime_instances, "m", _TmsCypressTestRuntime_enqueueMessageAsync).call(this, {
56
- type: "metadata",
57
- data: {
58
- workItemId: globalId,
59
- },
60
- });
61
- }
62
- /**
63
- * @deprecated Use addWorkItemId with a single globalId instead.
64
- */
65
46
  addWorkItemIds(...workItemIds) {
66
- console.warn("addWorkItemIds is deprecated. Use addWorkItemId with a single globalId instead.");
67
47
  return __classPrivateFieldGet(this, _TmsCypressTestRuntime_instances, "m", _TmsCypressTestRuntime_enqueueMessageAsync).call(this, {
68
48
  type: "metadata",
69
49
  data: {
@@ -14,13 +14,8 @@ export interface AttachmentOptions {
14
14
  }
15
15
  export interface TestRuntime {
16
16
  addLabels(...labels: string[]): PromiseLike<void>;
17
- addLayer(layer: string): PromiseLike<void>;
18
17
  addTags(...tags: string[]): PromiseLike<void>;
19
18
  addLinks(...links: Link[]): PromiseLike<void>;
20
- addWorkItemId(globalId: string): PromiseLike<void>;
21
- /**
22
- * @deprecated Use addWorkItemId with a single globalId instead.
23
- */
24
19
  addWorkItemIds(...workItemIds: string[]): PromiseLike<void>;
25
20
  addParameter(name: string, value: string): PromiseLike<void>;
26
21
  addDescription(markdown: string): PromiseLike<void>;
@@ -11,10 +11,8 @@ var ContentType;
11
11
  const noop = { then: () => noop, catch: () => noop };
12
12
  exports.noopRuntime = {
13
13
  addLabels: () => noop,
14
- addLayer: () => noop,
15
14
  addTags: () => noop,
16
15
  addLinks: () => noop,
17
- addWorkItemId: () => noop,
18
16
  addWorkItemIds: () => noop,
19
17
  addParameter: () => noop,
20
18
  addDescription: () => noop,
@@ -24,7 +24,6 @@ export interface TestData {
24
24
  namespace?: string;
25
25
  classname?: string;
26
26
  labels: string[];
27
- layer?: string;
28
27
  tags: string[];
29
28
  links: Link[];
30
29
  workItemIds: string[];
package/dist/converter.js CHANGED
@@ -44,7 +44,6 @@ function toAutotestPost(specPath, t) {
44
44
  classname: t.classname,
45
45
  links: t.links?.length ? t.links : [],
46
46
  labels: t.labels?.map((l) => ({ name: l })) ?? [],
47
- layer: t.layer,
48
47
  tags: t.tags?.length ? t.tags : [],
49
48
  steps: t.steps.map(s => stepDataToShortStep(s)),
50
49
  externalKey: t.externalKey,
@@ -174,11 +174,9 @@ type RuntimeMessageBase<T extends string> = {
174
174
  export type RuntimeMetadataMessage = RuntimeMessageBase<"metadata"> & {
175
175
  data: {
176
176
  labels?: Label[];
177
- layer?: string;
178
177
  links?: Link[];
179
178
  tags?: string[];
180
179
  workItemIds?: string[];
181
- workItemId?: string;
182
180
  parameters?: Parameter[];
183
181
  description?: string;
184
182
  displayName?: string;
package/dist/reporter.js CHANGED
@@ -406,19 +406,12 @@ class TmsCypress {
406
406
  if (data.labels?.length) {
407
407
  current.labels.push(...data.labels);
408
408
  }
409
- if (data.layer) {
410
- current.layer = data.layer;
411
- }
412
409
  if (data.tags?.length) {
413
410
  current.tags.push(...data.tags);
414
411
  }
415
412
  if (data.workItemIds?.length) {
416
- console.warn("addWorkItemIds is deprecated. Use addWorkItemId with a single globalId instead.");
417
413
  current.workItemIds.push(...data.workItemIds);
418
414
  }
419
- if (data.workItemId) {
420
- current.workItemIds = [data.workItemId];
421
- }
422
415
  if (data.links?.length) {
423
416
  current.links.push(...data.links);
424
417
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testit-adapter-cypress",
3
- "version": "5.0.7",
3
+ "version": "5.0.8-TMS-5.8",
4
4
  "description": "Cypress adapter for Test IT",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -42,7 +42,7 @@
42
42
  "@types/node": "^20.14.2"
43
43
  },
44
44
  "dependencies": {
45
- "testit-js-commons": "5.0.7"
45
+ "testit-js-commons": "5.0.8-TMS-5.8"
46
46
  },
47
47
  "files": [
48
48
  "dist"