monocart-reporter 2.9.15 → 2.9.17

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
@@ -6,6 +6,11 @@
6
6
  ![](https://img.shields.io/github/license/cenfun/monocart-reporter)
7
7
  ![](https://img.shields.io/github/actions/workflow/status/cenfun/monocart-reporter/static.yml)
8
8
 
9
+ ![](/docs/report.gif)
10
+
11
+ Preview: [https://cenfun.github.io/monocart-reporter](https://cenfun.github.io/monocart-reporter)
12
+
13
+ ![](/docs/cli.png)
9
14
 
10
15
  * A [Playwright](https://github.com/microsoft/playwright) Test [Reporter](https://playwright.dev/docs/test-reporters) (Node.js)
11
16
  - A `Tree Grid` style test reporter
@@ -15,7 +20,6 @@
15
20
  - Timeline Workers Graph
16
21
  - Monitor CPU and Memory Usage
17
22
  - Export Data (json)
18
- * [Preview](#preview)
19
23
  * [Install](#install)
20
24
  * [Playwright Config](#playwright-config)
21
25
  * [Examples](#examples)
@@ -41,6 +45,7 @@
41
45
  - [Global Coverage Report](#global-coverage-report)
42
46
  - [Coverage Options](#coverage-options)
43
47
  - [Coverage Examples](#coverage-examples)
48
+ * [Attach Markdown/Mermaid](#attach-markdownmermaid)
44
49
  * [Attach Lighthouse Audit Report](#attach-lighthouse-audit-report)
45
50
  * [Attach Network Report](#attach-network-report)
46
51
  * [Global State Management](#global-state-management)
@@ -54,15 +59,6 @@
54
59
  * [Contributing](#contributing)
55
60
  * [Changelog](CHANGELOG.md)
56
61
 
57
-
58
- ## Preview
59
- [https://cenfun.github.io/monocart-reporter](https://cenfun.github.io/monocart-reporter)
60
-
61
- ![](/docs/report.gif)
62
-
63
- ![](/docs/cli.png)
64
- (For Github actions, we can enforce color with env: `FORCE_COLOR: true`)
65
-
66
62
  ## Install
67
63
  ```sh
68
64
  npm i -D monocart-reporter
@@ -834,6 +830,25 @@ see [Collecting V8 Coverage Data from Node.js](https://github.com/cenfun/monocar
834
830
  - [nextjs-with-playwright](https://github.com/cenfun/nextjs-with-playwright)
835
831
  - [code-coverage-with-monocart-reporter](https://github.com/edumserrano/playwright-adventures/blob/main/demos/code-coverage-with-monocart-reporter/)
836
832
 
833
+ ### Attach Markdown/Mermaid
834
+ ```js
835
+ test.info().attach('text/markdown:', {
836
+ contentType: 'text/markdown',
837
+ body: `### My Markdown Title
838
+ - item 1
839
+ - item 2`
840
+ });
841
+
842
+ test.info().attach('text/mermaid:', {
843
+ contentType: 'text/mermaid',
844
+ body: `
845
+ flowchart LR
846
+ id
847
+ `
848
+ });
849
+
850
+ ```
851
+
837
852
  ## Attach Lighthouse Audit Report
838
853
  Attach an audit report with API `attachAuditReport(runnerResult, testInfo)`. Arguments:
839
854
  - `runnerResult` lighthouse result. see [lighthouse](https://github.com/GoogleChrome/lighthouse/tree/main/docs)