playwright-qase-reporter 2.0.15 → 2.0.16

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/changelog.md CHANGED
@@ -1,3 +1,9 @@
1
+ # playwright-qase-reporter@2.0.16
2
+
3
+ ## What's new
4
+
5
+ Improve excluding default steps, like `Worker Cleanup`, `Before Hook`, and `After Hook`.
6
+
1
7
  # playwright-qase-reporter@2.0.15
2
8
 
3
9
  ## What's new
@@ -103,4 +103,10 @@ export declare class PlaywrightQaseReporter implements Reporter {
103
103
  * @private
104
104
  */
105
105
  private extractQaseIdsFromAnnotation;
106
+ /**
107
+ * @param {TestStep[]} steps
108
+ * @returns {boolean}
109
+ * @private
110
+ */
111
+ private checkChildrenSteps;
106
112
  }
package/dist/reporter.js CHANGED
@@ -184,7 +184,7 @@ class PlaywrightQaseReporter {
184
184
  || testStep.title.match(stepAttachRegexp)) {
185
185
  continue;
186
186
  }
187
- if (defaultSteps.includes(testStep.title) && testStep.steps.length === 0) {
187
+ if (defaultSteps.includes(testStep.title) && this.checkChildrenSteps(testStep.steps)) {
188
188
  continue;
189
189
  }
190
190
  const attachments = this.stepAttachments.get(testStep);
@@ -411,6 +411,22 @@ class PlaywrightQaseReporter {
411
411
  }
412
412
  return ids;
413
413
  }
414
+ /**
415
+ * @param {TestStep[]} steps
416
+ * @returns {boolean}
417
+ * @private
418
+ */
419
+ checkChildrenSteps(steps) {
420
+ if (steps.length === 0) {
421
+ return true;
422
+ }
423
+ for (const step of steps) {
424
+ if (step.category === 'test.step' || step.category === 'hook') {
425
+ return false;
426
+ }
427
+ }
428
+ return true;
429
+ }
414
430
  }
415
431
  exports.PlaywrightQaseReporter = PlaywrightQaseReporter;
416
432
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-qase-reporter",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "description": "Qase TMS Playwright Reporter",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",