testit-adapter-playwright 3.7.8 → 3.7.9

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 +7 -6
  2. package/package.json +2 -2
package/dist/reporter.js CHANGED
@@ -181,13 +181,14 @@ class TmsReporter {
181
181
  const origin = await this.strategy.client.autoTests.getAutotestByExternalId(autotestData.externalId);
182
182
  if (!origin) {
183
183
  const dictionaries = this.getDictionariesByTest(test);
184
- const namespace = dictionaries.slice(0, -1).join(path_1.default.sep);
185
- const classname = dictionaries[dictionaries.length - 1];
186
- if (namespace.length > 0) {
187
- autotestData.namespace = namespace;
184
+ const pathNamespace = dictionaries.slice(0, -1).join(path_1.default.sep);
185
+ const pathClassname = dictionaries[dictionaries.length - 1];
186
+ // Prefer testit.namespace / testit.classname from attachments; file path is the default only when missing.
187
+ if (pathNamespace.length > 0 && autotestData.namespace == null) {
188
+ autotestData.namespace = pathNamespace;
188
189
  }
189
- if (classname?.length) {
190
- autotestData.classname = classname;
190
+ if (pathClassname?.length && autotestData.classname == null) {
191
+ autotestData.classname = pathClassname;
191
192
  }
192
193
  }
193
194
  const autotest = converter_1.Converter.convertTestCaseToAutotestPost(autotestData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testit-adapter-playwright",
3
- "version": "3.7.8",
3
+ "version": "3.7.9",
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.7.8"
43
+ "testit-js-commons": "3.7.9"
44
44
  },
45
45
  "files": [
46
46
  "dist"