-
Notifications
You must be signed in to change notification settings - Fork 32
maxNumberOfFailuresToShow doesn't seem to work as expected. #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
yeah this is a legit bug. Seems this bit of the code https://github.com/ryanrosello-og/playwright-slack-report/blob/main/src/SlackReporter.ts#L77 is treating zero as falsy so its always falling back to showing 10 failures even though you specified 0 as its value. should be straight-forward fix: this.maxNumberOfFailuresToShow
= slackReporterConfig.maxNumberOfFailuresToShow !== undefined ? slackReporterConfig.maxNumberOfFailuresToShow : 10; leave it with me. I can take a look |
Okey ! Waiting for the fix then ! Thanks 🙏🏻 |
Hello, @ryanrosello-og FYI, I tested by replacing the value to 1, I still have multiple error shown in the slack reporting and still have the message : My cli_config.json looks like that :
|
* chore: Update maxNumberOfFailuresToShow default value in SlackReporter #125 * chore: Bump version to 1.1.73 in package.json
@ryanrosello-og Hello, I updated to the latest version : See my cli_config.json file :
Here is a resume of the slack report :
|
@samixchoumi it turns out your config is using the wrong key, use When you provided ![]() |
Oh, I though I needed to use this parameter : https://github.com/ryanrosello-og/playwright-slack-report?tab=readme-ov-file#maxnumberoffailurestoshow |
It works ! |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Bug description
Looking at the example from the doc here : maxNumberOfFailuresToShow, it doesn't seem to work as expected when I set
maxNumberOfFailuresToShow
to 0 in mycli_config.json
file like that :"maxNumberOfFailuresToShow": 0,
How to reproduce (please include a snippet of your Playwright Slack Reporter configuration)
maxNumberOfFailuresToShow
to '0
'Not sure if it's useful, but I use :
Expected behavior
No failure shown in the Slack report.
Environment & setup
playwright-slack-report version
The text was updated successfully, but these errors were encountered: