testit-adapter-playwright 3.4.1 → 3.4.3-TMS-5.5

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.
Files changed (2) hide show
  1. package/dist/reporter.js +11 -7
  2. package/package.json +2 -2
package/dist/reporter.js CHANGED
@@ -100,19 +100,23 @@ class TmsReporter {
100
100
  return location.split(path_1.default.sep);
101
101
  }
102
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);
108
103
  const autotestData = {
109
104
  externalId: testit_js_commons_1.Utils.getHash(test.title),
110
105
  displayName: test.title,
111
106
  addAttachments: [],
112
107
  externalKey: test.title,
113
- namespace: namespace,
114
- classname: classname,
115
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
+ }
116
120
  for (const attachment of result.attachments) {
117
121
  if (!attachment.body) {
118
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.4.1",
3
+ "version": "3.4.3-TMS-5.5",
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.1"
43
+ "testit-js-commons": "3.4.3-TMS-5.5"
44
44
  },
45
45
  "files": [
46
46
  "dist"