Skip to content

Commit

Permalink
feature: improve steps handling
Browse files Browse the repository at this point in the history
Exclude `Worker Cleanup` step if it doesn't have children steps.
  • Loading branch information
gibiw committed Sep 25, 2024
1 parent 03c78c3 commit 0244f19
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions qase-playwright/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# [email protected]

## What's new

Exclude `Worker Cleanup` step if it doesn't have children steps.

# [email protected]

## What's new
Expand Down
2 changes: 1 addition & 1 deletion qase-playwright/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "playwright-qase-reporter",
"version": "2.0.14",
"version": "2.0.15",
"description": "Qase TMS Playwright Reporter",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion qase-playwright/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ interface TestCaseMetadata {
comment: string;
}

const defaultSteps: string[] = ['Before Hooks', 'After Hooks', 'Worker Cleanup'];

export type PlaywrightQaseOptionsType = ConfigType;

/**
Expand Down Expand Up @@ -249,7 +251,7 @@ export class PlaywrightQaseReporter implements Reporter {
continue;
}

if ((testStep.title === 'Before Hooks' || testStep.title === 'After Hooks') && testStep.steps.length === 0) {
if (defaultSteps.includes(testStep.title) && testStep.steps.length === 0) {
continue;
}

Expand Down

0 comments on commit 0244f19

Please sign in to comment.