testit-adapter-playwright 3.4.0 → 3.4.1

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.
@@ -27,6 +27,7 @@ declare class TmsReporter implements Reporter {
27
27
  onEnd(): Promise<void>;
28
28
  addSkippedResults(): Promise<void>;
29
29
  printsToStdio(): boolean;
30
+ private getDictionariesByTest;
30
31
  private getAutotestData;
31
32
  private loadTest;
32
33
  }
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,12 +92,26 @@ 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) {
103
+ const dictionaries = this.getDictionariesByTest(test);
104
+ const classname = dictionaries[dictionaries.length - 1];
105
+ const namespace = dictionaries
106
+ .slice(0, -1)
107
+ .join(path_1.default.sep);
92
108
  const autotestData = {
93
109
  externalId: testit_js_commons_1.Utils.getHash(test.title),
94
110
  displayName: test.title,
95
111
  addAttachments: [],
96
112
  externalKey: test.title,
113
+ namespace: namespace,
114
+ classname: classname,
97
115
  };
98
116
  for (const attachment of result.attachments) {
99
117
  if (!attachment.body) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testit-adapter-playwright",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
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.4.0"
43
+ "testit-js-commons": "3.4.1"
44
44
  },
45
45
  "files": [
46
46
  "dist"