testit-adapter-playwright 3.2.10 → 3.2.11-TMS-5.4
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/dist/reporter.d.ts +1 -0
- package/dist/reporter.js +22 -0
- package/package.json +2 -2
package/dist/reporter.d.ts
CHANGED
package/dist/reporter.js
CHANGED
|
@@ -13,10 +13,14 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
16
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
20
|
const testit_js_commons_1 = require("testit-js-commons");
|
|
18
21
|
const converter_1 = require("./converter");
|
|
19
22
|
const utils_1 = require("./utils");
|
|
23
|
+
const path_1 = __importDefault(require("path"));
|
|
20
24
|
class TmsReporter {
|
|
21
25
|
constructor(options) {
|
|
22
26
|
this.testCache = new Array();
|
|
@@ -88,6 +92,13 @@ class TmsReporter {
|
|
|
88
92
|
printsToStdio() {
|
|
89
93
|
return false;
|
|
90
94
|
}
|
|
95
|
+
getDictionariesByTest(test) {
|
|
96
|
+
const location = test.parent.title;
|
|
97
|
+
if (location == undefined) {
|
|
98
|
+
return [];
|
|
99
|
+
}
|
|
100
|
+
return location.split(path_1.default.sep);
|
|
101
|
+
}
|
|
91
102
|
async getAutotestData(test, result) {
|
|
92
103
|
const autotestData = {
|
|
93
104
|
externalId: testit_js_commons_1.Utils.getHash(test.title),
|
|
@@ -95,6 +106,17 @@ class TmsReporter {
|
|
|
95
106
|
addAttachments: [],
|
|
96
107
|
externalKey: test.title,
|
|
97
108
|
};
|
|
109
|
+
const dictionaries = this.getDictionariesByTest(test);
|
|
110
|
+
const namespace = dictionaries
|
|
111
|
+
.slice(0, -1)
|
|
112
|
+
.join(path_1.default.sep);
|
|
113
|
+
const classname = dictionaries[dictionaries.length - 1];
|
|
114
|
+
if (namespace != undefined && namespace.length > 0) {
|
|
115
|
+
autotestData.namespace = namespace;
|
|
116
|
+
}
|
|
117
|
+
if (classname != undefined && classname.length > 0) {
|
|
118
|
+
autotestData.classname = classname;
|
|
119
|
+
}
|
|
98
120
|
for (const attachment of result.attachments) {
|
|
99
121
|
if (!attachment.body) {
|
|
100
122
|
if (attachment.path && attachment.name !== "screenshot") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testit-adapter-playwright",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.11-TMS-5.4",
|
|
4
4
|
"description": "Playwright adapter for Test IT",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"prettier": "^3.0.1"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"testit-js-commons": "3.2.
|
|
43
|
+
"testit-js-commons": "3.2.11-TMS-5.4"
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
46
46
|
"dist"
|