monocart-reporter 2.9.16 → 2.9.18

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.
@@ -216,6 +216,15 @@ const Util = {
216
216
  return false;
217
217
  },
218
218
 
219
+ isMermaidType(contentType) {
220
+ if (contentType) {
221
+ if (contentType === 'text/vnd.mermaid' || contentType === 'text/mermaid' || contentType === 'mermaid') {
222
+ return true;
223
+ }
224
+ }
225
+ return false;
226
+ },
227
+
219
228
  isTextType(contentType) {
220
229
  if (contentType) {
221
230
  if (contentType.startsWith('text')) {
@@ -224,6 +233,9 @@ const Util = {
224
233
  if (Util.isMarkdownType(contentType)) {
225
234
  return true;
226
235
  }
236
+ if (Util.isMermaidType(contentType)) {
237
+ return true;
238
+ }
227
239
  if (Util.isJsonType(contentType)) {
228
240
  return true;
229
241
  }
package/lib/visitor.js CHANGED
@@ -500,11 +500,28 @@ class Visitor {
500
500
  return;
501
501
  }
502
502
 
503
+ const attachmentList = attachments.filter((item) => {
504
+ // remove _prompt
505
+ if (item.name && item.name.startsWith('_prompt-')) {
506
+ return false;
507
+ }
508
+ return true;
509
+ }).map((item) => {
510
+ // do not change original attachment item for after reporters
511
+ return {
512
+ ... item
513
+ };
514
+ });
515
+
516
+ if (!Util.isList(attachmentList)) {
517
+ return;
518
+ }
519
+
503
520
  const title = caseItem.title;
504
521
 
505
522
  const list = [];
506
523
 
507
- attachments.forEach((item, i) => {
524
+ attachmentList.forEach((item, i) => {
508
525
 
509
526
  // metadata with body
510
527
  if (this.testMetadataHandler(item, caseItem)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monocart-reporter",
3
- "version": "2.9.16",
3
+ "version": "2.9.18",
4
4
  "description": "A playwright test reporter. Shows suites/cases/steps with tree style, markdown annotations, custom columns/formatters/data collection visitors, console logs, style tags, send email.",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -44,32 +44,32 @@
44
44
  "dependencies": {
45
45
  "console-grid": "^2.2.3",
46
46
  "eight-colors": "^1.3.1",
47
- "koa": "^2.16.0",
47
+ "koa": "^2.16.1",
48
48
  "koa-static-resolver": "^1.0.6",
49
49
  "lz-utils": "^2.1.0",
50
- "monocart-coverage-reports": "^2.12.3",
50
+ "monocart-coverage-reports": "^2.12.4",
51
51
  "monocart-locator": "^1.0.2",
52
- "nodemailer": "^6.10.0"
52
+ "nodemailer": "^6.10.1"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@babel/code-frame": "^7.26.2",
56
- "@playwright/test": "^1.51.0",
56
+ "@playwright/test": "^1.52.0",
57
57
  "ansi-to-html": "^0.7.2",
58
58
  "async-tick": "^1.0.0",
59
59
  "autolinker": "^4.1.0",
60
- "axios": "^1.8.3",
60
+ "axios": "^1.8.4",
61
61
  "commander": "^13.1.0",
62
- "dotenv": "^16.4.7",
63
- "eslint": "^9.22.0",
62
+ "dotenv": "^16.5.0",
63
+ "eslint": "^9.25.1",
64
64
  "eslint-config-plus": "^2.0.2",
65
65
  "eslint-plugin-html": "^8.1.2",
66
66
  "eslint-plugin-vue": "^10.0.0",
67
67
  "file-saver": "^2.0.5",
68
68
  "find-up": "^7.0.0",
69
69
  "github-markdown-css": "^5.8.1",
70
- "glob": "^11.0.1",
71
- "marked": "^15.0.7",
72
- "mermaid": "^11.5.0",
70
+ "glob": "^11.0.2",
71
+ "marked": "^15.0.10",
72
+ "mermaid": "^11.6.0",
73
73
  "mitt": "^3.0.1",
74
74
  "monocart-code-viewer": "^1.1.5",
75
75
  "monocart-formatter": "^3.0.1",
@@ -78,7 +78,7 @@
78
78
  "open": "8.4.2",
79
79
  "sanitize-filename": "^1.6.3",
80
80
  "stack-utils": "^2.0.6",
81
- "stylelint": "^16.15.0",
81
+ "stylelint": "^16.19.0",
82
82
  "stylelint-config-plus": "^1.1.3",
83
83
  "supports-color": "^10.0.0",
84
84
  "turbogrid": "^3.2.0",