testit-adapter-cypress 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 +3 -0
- package/dist/browser/runtime.d.ts +1 -0
- package/dist/browser/runtime.js +8 -0
- package/dist/browser/types.d.ts +1 -0
- package/dist/browser/types.js +1 -0
- package/dist/converter.d.ts +1 -0
- package/dist/converter.js +1 -0
- package/dist/models/types.d.ts +1 -0
- package/dist/reporter.js +3 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -142,6 +142,7 @@ Description of methods:
|
|
|
142
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
|
|
143
143
|
- `tms.addDescription` - a dynamic method for adding autotest description specified in the autotest card
|
|
144
144
|
- `tms.addLabels` - a dynamic method for adding labels listed in the autotest card
|
|
145
|
+
- `tms.addLayer` - test pyramid layer in the autotest card (source **Run**). Use `TestLayers` from `testit-js-commons` for recommended values, or any custom string
|
|
145
146
|
- `tms.addTags` - a dynamic method for adding tags listed in the autotest card
|
|
146
147
|
- `tms.addLinks` - links in the autotest result
|
|
147
148
|
- `tms.addAttachments` - uploading files in the autotest result
|
|
@@ -156,6 +157,7 @@ Description of methods:
|
|
|
156
157
|
#### Simple test
|
|
157
158
|
```ts
|
|
158
159
|
import { getTestRuntime } from "testit-adapter-cypress/runtime";
|
|
160
|
+
import { TestLayers } from "testit-js-commons";
|
|
159
161
|
|
|
160
162
|
describe('example to-do app', () => {
|
|
161
163
|
it('displays two todo items by default', () => {
|
|
@@ -166,6 +168,7 @@ describe('example to-do app', () => {
|
|
|
166
168
|
tms.addTitle('test title');
|
|
167
169
|
tms.addDescription('Test description');
|
|
168
170
|
tms.addLabels('label1', 'label2');
|
|
171
|
+
tms.addLayer(TestLayers.API);
|
|
169
172
|
tms.addTags('tag1', 'tag2');
|
|
170
173
|
tms.addLinks(
|
|
171
174
|
{
|
|
@@ -6,6 +6,7 @@ declare class TmsCypressTestRuntime implements TestRuntime {
|
|
|
6
6
|
#private;
|
|
7
7
|
constructor();
|
|
8
8
|
addLabels(...labels: string[]): PromiseLike<void>;
|
|
9
|
+
addLayer(layer: string): PromiseLike<void>;
|
|
9
10
|
addTags(...tags: string[]): PromiseLike<void>;
|
|
10
11
|
addLinks(...links: Link[]): PromiseLike<void>;
|
|
11
12
|
addWorkItemIds(...workItemIds: string[]): PromiseLike<void>;
|
package/dist/browser/runtime.js
CHANGED
|
@@ -27,6 +27,14 @@ 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
|
+
}
|
|
30
38
|
addTags(...tags) {
|
|
31
39
|
return __classPrivateFieldGet(this, _TmsCypressTestRuntime_instances, "m", _TmsCypressTestRuntime_enqueueMessageAsync).call(this, {
|
|
32
40
|
type: "metadata",
|
package/dist/browser/types.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface AttachmentOptions {
|
|
|
14
14
|
}
|
|
15
15
|
export interface TestRuntime {
|
|
16
16
|
addLabels(...labels: string[]): PromiseLike<void>;
|
|
17
|
+
addLayer(layer: string): PromiseLike<void>;
|
|
17
18
|
addTags(...tags: string[]): PromiseLike<void>;
|
|
18
19
|
addLinks(...links: Link[]): PromiseLike<void>;
|
|
19
20
|
addWorkItemIds(...workItemIds: string[]): PromiseLike<void>;
|
package/dist/browser/types.js
CHANGED
package/dist/converter.d.ts
CHANGED
package/dist/converter.js
CHANGED
|
@@ -44,6 +44,7 @@ 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,
|
|
47
48
|
tags: t.tags?.length ? t.tags : [],
|
|
48
49
|
steps: t.steps.map(s => stepDataToShortStep(s)),
|
|
49
50
|
externalKey: t.externalKey,
|
package/dist/models/types.d.ts
CHANGED
package/dist/reporter.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testit-adapter-cypress",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
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.
|
|
45
|
+
"testit-js-commons": "5.0.6"
|
|
46
46
|
},
|
|
47
47
|
"files": [
|
|
48
48
|
"dist"
|