Skip to content

Commit

Permalink
chore: Update reporter configuration property name #17
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Aug 7, 2024
1 parent 0b6d355 commit 51f3098
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The reporter supports the following configuration options:
| showAnnotations | Show annotations from tests | `true` |
| showTags | Show tags from tests | `true` |
| showError | Show error message in summary | `false` |
| report | Define which types of test results should be shown in the summary | `['pass', 'skipped', 'fail', 'flaky']` |
| includeResults | Define which types of test results should be shown in the summary | `['pass', 'skipped', 'fail', 'flaky']` |
| quiet | Do not show any output in the console | `false` |

To use these option, you can update the reporter configuration:
Expand Down
6 changes: 3 additions & 3 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const config: PlaywrightTestConfig<{}, {}> = {
useDetails: false,
showError: true,
quiet: false,
report: ["fail", "flaky", "skipped"],
includeResults: ["fail", "flaky", "skipped"],
},
],
[
Expand All @@ -30,7 +30,7 @@ const config: PlaywrightTestConfig<{}, {}> = {
useDetails: false,
showError: true,
quiet: false,
report: ["pass", "skipped"],
includeResults: ["pass", "skipped"],
},
],
[
Expand All @@ -39,7 +39,7 @@ const config: PlaywrightTestConfig<{}, {}> = {
title: "Reporter (details: true, report: fail, flaky, skipped)",
useDetails: true,
quiet: true,
report: ["fail", "flaky", "skipped"],
includeResults: ["fail", "flaky", "skipped"],
},
],
],
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class GitHubAction implements Reporter {
this.options.showTags = true;
}

if (typeof options.report === "undefined") {
this.options.report = ["fail", "flaky", "pass", "skipped"];
if (typeof options.includeResults === "undefined") {
this.options.includeResults = ["fail", "flaky", "pass", "skipped"];
}

if (process.env.NODE_ENV === "development") {
Expand Down
2 changes: 1 addition & 1 deletion src/models/GitHubActionOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export interface GitHubActionOptions {
showTags: boolean;
showError?: boolean;
quiet?: boolean;
report?: DisplayLevel[];
includeResults?: DisplayLevel[];
}
4 changes: 2 additions & 2 deletions src/utils/processResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const processResults = async (
options.showAnnotations,
options.showTags,
!!options.showError,
options.report as DisplayLevel[]
options.includeResults as DisplayLevel[]
);

if (!content) {
Expand All @@ -76,7 +76,7 @@ export const processResults = async (
options.showAnnotations,
options.showTags,
!!options.showError,
options.report as DisplayLevel[]
options.includeResults as DisplayLevel[]
);

if (tableRows.length !== 0) {
Expand Down

0 comments on commit 51f3098

Please sign in to comment.