mocha-qase-reporter 1.1.0 → 1.1.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.
Files changed (2) hide show
  1. package/dist/reporter.js +7 -10
  2. package/package.json +2 -2
package/dist/reporter.js CHANGED
@@ -170,7 +170,7 @@ class MochaQaseReporter extends mocha_1.reporters.Base {
170
170
  group_params: this.metadata.groupParameters ?? {},
171
171
  relations: relations,
172
172
  run_id: null,
173
- signature: this.getSignature(test, ids),
173
+ signature: this.getSignature(test, ids, this.metadata.parameters ?? {}),
174
174
  steps: this.currentTest.steps,
175
175
  id: (0, uuid_1.v4)(),
176
176
  execution: {
@@ -195,24 +195,21 @@ class MochaQaseReporter extends mocha_1.reporters.Base {
195
195
  * @param {number[]} ids
196
196
  * @private
197
197
  */
198
- getSignature(test, ids) {
199
- let signature = '';
198
+ getSignature(test, ids, params) {
199
+ const suites = [];
200
200
  const file = test.parent ? this.getFile(test.parent) : undefined;
201
201
  if (file) {
202
202
  const executionPath = process.cwd() + '/';
203
203
  const path = file.replace(executionPath, '');
204
- signature = path.split('/').join('::');
204
+ suites.push(path.split('/').join('::'));
205
205
  }
206
206
  if (test.parent) {
207
207
  for (const suite of test.parent.titlePath()) {
208
- signature += '::' + suite.toLowerCase().replace(/\s/g, '_');
208
+ suites.push(suite.toLowerCase().replace(/\s/g, '_'));
209
209
  }
210
210
  }
211
- signature += '::' + test.title.toLowerCase().replace(/\s/g, '_');
212
- if (ids.length > 0) {
213
- signature += '::' + ids.join('::');
214
- }
215
- return signature;
211
+ suites.push(test.title.toLowerCase().replace(/\s/g, '_'));
212
+ return (0, qase_javascript_commons_1.generateSignature)(ids, suites, params);
216
213
  }
217
214
  /**
218
215
  * @param {Suite} suite
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mocha-qase-reporter",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Mocha Cypress Reporter",
5
5
  "homepage": "https://github.com/qase-tms/qase-javascript",
6
6
  "sideEffects": false,
@@ -43,7 +43,7 @@
43
43
  "dependencies": {
44
44
  "mocha": "^10.2.0",
45
45
  "deasync-promise": "^1.0.1",
46
- "qase-javascript-commons": "~2.3.0",
46
+ "qase-javascript-commons": "~2.3.3",
47
47
  "uuid": "^9.0.1"
48
48
  },
49
49
  "devDependencies": {