monocart-reporter 2.2.3 → 2.2.4
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.
package/README.md
CHANGED
|
@@ -171,7 +171,8 @@ Separated metadata file (Already included in the above HTML and compressed, it c
|
|
|
171
171
|
```
|
|
172
172
|
|
|
173
173
|
## View Trace Online
|
|
174
|
-
> The [Trace Viewer](https://trace.playwright.dev/) requires that the trace file must be loaded over the http:// or https:// protocols without [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS) issue
|
|
174
|
+
> The [Trace Viewer](https://trace.playwright.dev/) requires that the trace file must be loaded over the http:// or https:// protocols without [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS) issue.
|
|
175
|
+
- Start a local web server with following CLI:
|
|
175
176
|
```sh
|
|
176
177
|
# serve and open report
|
|
177
178
|
npx monocart show-report <path-to-report>
|
|
@@ -179,13 +180,15 @@ npx monocart show-report <path-to-report>
|
|
|
179
180
|
# serve report
|
|
180
181
|
npx monocart serve-report <path-to-report>
|
|
181
182
|
```
|
|
182
|
-
|
|
183
|
-
|
|
183
|
+
The server add the http header `Access-Control-Allow-Origin: *` to [allow requesting from any origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin), it works with `http://localhost:port/` or `http://127.0.0.1:port/`
|
|
184
|
+
- To successfully work with other `IP` or `domain`, you can start web server with `https`:
|
|
184
185
|
```sh
|
|
185
186
|
npx monocart show-report <path-to-report> --ssl <path-to-key,path-to-cert>
|
|
186
|
-
# For local debug, you can create and install local CA with 'mkcert', see: https://mkcert.dev
|
|
187
187
|
```
|
|
188
|
-
|
|
188
|
+
For example: `npx monocart show-report test-results/index.html --ssl ssl/key.pem,ssl/cert.pem`
|
|
189
|
+
|
|
190
|
+
You can create and install local CA with [mkcert](https://mkcert.dev)
|
|
191
|
+
- Using your own trace viewer url with option `traceViewerUrl`:
|
|
189
192
|
```js
|
|
190
193
|
// reporter options
|
|
191
194
|
{
|