Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Jul 5, 2024
1 parent d2e8390 commit d89e083
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

All notable changes to this project will be documented in this file.

## [0.0.2]

- Update readme with more information on how to use the configuration options.

## [0.0.1]

- Initial release of the `playwright-msteams-reporter`.
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ export default defineConfig({

The reporter supports the following configuration options:

| Option | Description | Required | Default |
| --- | --- | --- | --- |
| `webhookUrl` | The Microsoft Teams webhook URL | `true` | `undefined` |
| `title` | The notification title | `false` | `Playwright Test Results` |
| `linkToResultsUrl` | Link to the test results | `false` | `undefined` |
| `linkToResultsText` | Text for the link to the test results | `false` | `View test results` |
| `notifyOnSuccess` | Notify on success | `false` | `true` |
| `mentionOnFailure` | Mention users on failure | `false` | `[]` |
| `mentionOnFailureText` | Text to mention users on failure | `false` | `{mentions} please validate the test results.` |
| `quiet` | Do not show any output in the console | `false` | `false` |
| Option | Description | Type | Required | Default |
| --- | --- | --- | --- | --- |
| `webhookUrl` | The Microsoft Teams webhook URL | `boolean` | `true` | `undefined` |
| `title` | The notification title | `string` | `false` | `Playwright Test Results` |
| `linkToResultsUrl` | Link to the test results | `string` | `false` | `undefined` |
| `linkToResultsText` | Text for the link to the test results | `string` | `false` | `View test results` |
| `notifyOnSuccess` | Notify on success | `boolean` | `false` | `true` |
| `mentionOnFailure` | Mention users on failure (comma separated list) | `string` | `false` | `undefined` |
| `mentionOnFailureText` | Text to mention users on failure | `string` | `false` | `{mentions} please validate the test results.` |
| `quiet` | Do not show any output in the console | `boolean` | `false` | `false` |

### Mention users

Expand All @@ -69,11 +69,22 @@ The format can be either the full name and email (`"Full name <email>"`) or just

```javascript
{
mentionOnFailure: ["Elio Struyf <mail@elio.dev>", "mail@elio.dev"],
mentionOnFailure: "Elio Struyf <mail@elio.dev>,mail@elio.dev",
mentionOnFailureText: "{mentions} check those failed tests!"
}
```

### Link to the results

With the `linkToResultsUrl` option, you can provide a link to the test results. You can for instance use this to view the test results on your CI/CD platform.

```javascript
{
// The link to your GitHub Actions workflow run
linkToResultsUrl: `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
}
```

<br />

[![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Festruyf%2Fplaywright-msteams-reporter&countColor=%23263759)](https://visitorbadge.io/status?path=https%3A%2F%2Fgithub.com%2Festruyf%2Fplaywright-msteams-reporter)

0 comments on commit d89e083

Please sign in to comment.