testit-adapter-codecept 5.0.8-TMS-5.8 → 5.0.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
@@ -140,12 +140,14 @@ $ npx codeceptjs run --grep "$(cat tmp/filter.txt)"
140
140
  Methods can be used to specify information about autotest.
141
141
 
142
142
  Description of metadata methods:
143
- - `workItemIds` - a method that links autotests with manual tests. Receives the array of manual tests' IDs
143
+ - `workItemId` - a method that links an autotest with a manual test. Receives a single globalId
144
+ - `workItemIds` - deprecated, use `workItemId` instead
144
145
  - `displayName` - internal autotest name (used in Test IT)
145
146
  - `externalId` - unique internal autotest ID (used in Test IT)
146
147
  - `title` - autotest name specified in the autotest card. If not specified, the name from the displayName method is used
147
148
  - `description` - autotest description specified in the autotest card
148
149
  - `labels` - labels listed in the autotest card
150
+ - `layer` - test pyramid layer in the autotest card (source **Run**). Use `TestLayers` from `testit-js-commons` for recommended values, or any custom string
149
151
  - `tags` - tags listed in the autotest card
150
152
  - `link` - links listed in the autotest card
151
153
  - `namespace` - directory in the TMS system
@@ -170,6 +172,7 @@ Scenario(
170
172
  title: 'Title',
171
173
  description: 'Description',
172
174
  labels: ['Custom label'],
175
+ layer: 'API',
173
176
  links: [
174
177
  {
175
178
  title: 'Google about this error',
@@ -179,7 +182,7 @@ Scenario(
179
182
  hasInfo: true
180
183
  }
181
184
  ],
182
- workItemIds: ['1140']
185
+ workItemId: '1140'
183
186
  },
184
187
  ({ I }) => {
185
188
  I.amOnPage('https://github.com');
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TestsBuilder = void 0;
4
4
  const utils_1 = require("../common/utils");
5
+ const testit_js_commons_1 = require("testit-js-commons");
5
6
  class TestsBuilder {
6
7
  static build(test) {
7
8
  var _a, _b, _c, _d, _e, _f;
@@ -15,6 +16,7 @@ class TestsBuilder {
15
16
  title: config === null || config === void 0 ? void 0 : config.title,
16
17
  name: (_a = config === null || config === void 0 ? void 0 : config.displayName) !== null && _a !== void 0 ? _a : test.title,
17
18
  labels: ((_b = config === null || config === void 0 ? void 0 : config.labels) !== null && _b !== void 0 ? _b : []).map((label) => ({ name: label })),
19
+ layer: config === null || config === void 0 ? void 0 : config.layer,
18
20
  tags: (_c = config === null || config === void 0 ? void 0 : config.tags) !== null && _c !== void 0 ? _c : [],
19
21
  description: (_d = config === null || config === void 0 ? void 0 : config.description) !== null && _d !== void 0 ? _d : "",
20
22
  steps: this.buildManySteps(test.steps),
@@ -24,6 +26,7 @@ class TestsBuilder {
24
26
  externalId: (_f = (0, utils_1.useDefaultHash)(test)) !== null && _f !== void 0 ? _f : (0, utils_1.useCompositeHash)(test),
25
27
  namespace: config === null || config === void 0 ? void 0 : config.nameSpace,
26
28
  classname: config === null || config === void 0 ? void 0 : config.className,
29
+ workItemIds: resolveWorkItemIds(config),
27
30
  externalKey: test.title,
28
31
  };
29
32
  }
@@ -38,3 +41,13 @@ class TestsBuilder {
38
41
  }
39
42
  }
40
43
  exports.TestsBuilder = TestsBuilder;
44
+ function resolveWorkItemIds(config) {
45
+ var _a;
46
+ if ((_a = config === null || config === void 0 ? void 0 : config.workItemIds) === null || _a === void 0 ? void 0 : _a.length) {
47
+ testit_js_commons_1.logger.warn("workItemIds is deprecated. Use workItemId with a single globalId instead.");
48
+ }
49
+ if (config === null || config === void 0 ? void 0 : config.workItemId) {
50
+ return [config.workItemId];
51
+ }
52
+ return config === null || config === void 0 ? void 0 : config.workItemIds;
53
+ }
@@ -7,8 +7,13 @@ export declare namespace Origin {
7
7
  externalId?: string;
8
8
  links: Link[];
9
9
  labels?: string[];
10
+ layer?: string;
10
11
  tags?: string[];
11
- workItemIds?: [];
12
+ workItemId?: string;
13
+ /**
14
+ * @deprecated Use workItemId with a single globalId instead.
15
+ */
16
+ workItemIds?: string[];
12
17
  classname?: string;
13
18
  namespace?: string;
14
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testit-adapter-codecept",
3
- "version": "5.0.8-TMS-5.8",
3
+ "version": "5.0.8",
4
4
  "description": "Codecept adapter for Test IT",
5
5
  "keywords": [],
6
6
  "author": {
@@ -15,7 +15,7 @@
15
15
  "watch": "tsc -p tsconfig.json -w"
16
16
  },
17
17
  "dependencies": {
18
- "testit-js-commons": "5.0.8-TMS-5.8"
18
+ "testit-js-commons": "5.0.8"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@codeceptjs/configure": "^0.10.0",