playwright-slack-report 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +30 -20
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # playwright-slack-report ![Biulds](https://github.com/ryanrosello-og/playwright-slack-report/actions/workflows/playwright.yml/badge.svg) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ryanrosello-og/playwright-slack-report/blob/master/LICENSE) [![Coverage Status](https://coveralls.io/repos/github/ryanrosello-og/playwright-slack-report/badge.svg?branch=main)](https://coveralls.io/github/ryanrosello-og/playwright-slack-report?branch=main)
1
+ # playwright-slack-report ![Builds](https://github.com/ryanrosello-og/playwright-slack-report/actions/workflows/playwright.yml/badge.svg) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ryanrosello-og/playwright-slack-report/blob/master/LICENSE) [![Coverage Status](https://coveralls.io/repos/github/ryanrosello-og/playwright-slack-report/badge.svg?branch=main)](https://coveralls.io/github/ryanrosello-og/playwright-slack-report?branch=main)
2
2
 
3
3
  [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ryanrosello-og/playwright-slack-report)
4
4
 
@@ -47,7 +47,12 @@ Run your tests by providing your` SLACK_BOT_USER_OAUTH_TOKEN` as an environment
47
47
 
48
48
  `SLACK_BOT_USER_OAUTH_TOKEN=[your Slack bot user OAUTH token] npx playwright test`
49
49
 
50
- # ℹ️ How do I find my Slack bot oauth token?
50
+ > **NOTE:** The Slack channel that you specify will need to be *public*, this app will not be able to publish messages to private channels.
51
+
52
+ ---
53
+
54
+ <details>
55
+ <summary><b>🔎 How do I find my Slack bot oauth token?</b></summary>
51
56
 
52
57
  You will need to have Slack administrator rights to perform the steps below.
53
58
 
@@ -86,6 +91,10 @@ The final step will be to copy the generated Bot User OAuth Token aka `SLACK_BOT
86
91
 
87
92
  ![Final](https://github.com/ryanrosello-og/playwright-slack-report/blob/main/assets/2022-08-09_5-53-17.png?raw=true)
88
93
 
94
+ </details>
95
+
96
+ ---
97
+
89
98
  # ⚙️ Configuration
90
99
 
91
100
  An example advanced configuration is shown below:
@@ -102,23 +111,24 @@ An example advanced configuration is shown below:
102
111
  {
103
112
  channels: ["pw-tests", "ci"], // provide one or more Slack channels
104
113
  sendResults: "always", // "always" , "on-failure", "off"
114
+ layout: generateCustomLayout,
115
+ maxNumberOfFailuresToShow: 4,
116
+ meta: [
117
+ {
118
+ key: 'BUILD_NUMBER',
119
+ value: '323332-2341',
120
+ },
121
+ {
122
+ key: 'WHATEVER_ENV_VARIABLE',
123
+ value: process.env.SOME_ENV_VARIABLE, // depending on your CI environment, this can be the branch name, build id, etc
124
+ },
125
+ {
126
+ key: 'HTML Results',
127
+ value: '<https://your-build-artifacts.my.company.dev/pw/23887/playwright-report/index.html|📊>',
128
+ },
129
+ ],
105
130
  },
106
- layout: generateCustomLayout,
107
- maxNumberOfFailuresToShow: 4,
108
- meta: [
109
- {
110
- key: 'BUILD_NUMBER',
111
- value: '323332-2341',
112
- },
113
- {
114
- key: 'WHATEVER_ENV_VARIABLE',
115
- value: process.env.SOME_ENV_VARIABLE, // depending on your CI environment, this can be the branch name, build id, etc
116
- },
117
- {
118
- key: 'HTML Results',
119
- value: '<https://your-build-artifacts.my.company.dev/pw/23887/playwright-report/index.html|📊>',
120
- },
121
- ],
131
+
122
132
  ],
123
133
  ],
124
134
  ```
@@ -191,9 +201,9 @@ In your, `playwright.confing.ts` file, add your function into the config.
191
201
  {
192
202
  channels: ["pw-tests", "ci"], // provide one or more Slack channels
193
203
  sendResults: "always", // "always" , "on-failure", "off"
204
+ layout: generateCustomLayout,
205
+ ...
194
206
  },
195
- layout: generateCustomLayout,
196
- ...
197
207
  ],
198
208
  ],
199
209
  ```
package/package.json CHANGED
@@ -28,7 +28,7 @@
28
28
  "lint":"npx eslint . --ext .ts"
29
29
  },
30
30
  "name": "playwright-slack-report",
31
- "version": "1.0.18",
31
+ "version": "1.0.19",
32
32
  "main": "index.js",
33
33
  "types": "dist/index.d.ts",
34
34
  "repository": "git@github.com:ryanrosello-og/playwright-slack-report.git",