playwright-community / playwright-msteams-reporter

Microsoft Teams reporter for Playwright
https://www.npmjs.com/package/playwright-msteams-reporter
MIT License
10 stars 4 forks source link

Added extra param to control when to report based on suite values #15

Closed siteriaitaliana closed 2 months ago

siteriaitaliana commented 2 months ago

A simple param/function can now passed to decide if the report should be sent or not based on the decision logic passed around any suite value/property.

siteriaitaliana commented 2 months ago

@estruyf have created this PR to introduce a new shouldRun param, be nice if we could get this merged/released as we wouldn't like to keep using our own forked version of the package.

estruyf commented 2 months ago

Thanks @siteriaitaliana would you be able to provide an example as well how and when you would use it?

siteriaitaliana commented 2 months ago

Thanks @siteriaitaliana would you be able to provide an example as well how and when you would use it?

Hi @estruyf sure.. in our case we only want to report when the project name contains a string e.g. '__jenkins' otherwise even our local runs report and the channel becomes pretty polluted, but i can honestly think this opens to much more flexibility and different user cases.

I have pushed a readme change with an example too.

estruyf commented 2 months ago

Thanks @siteriaitaliana for the update, I'll release the new version with this change.