monocart-reporter 2.4.9 → 2.5.1

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/lib/utils/util.js CHANGED
@@ -58,6 +58,13 @@ const Util = {
58
58
  return hash.digest('hex');
59
59
  },
60
60
 
61
+ calculateId: (id) => {
62
+ if (id) {
63
+ return Util.calculateSha1(id).slice(0, 20);
64
+ }
65
+ return Util.uid();
66
+ },
67
+
61
68
  parseComments: (input) => {
62
69
  const str = `${input}`;
63
70
  // starts with @ , ends without @ encodeURIComponent("@") %40
@@ -122,7 +129,7 @@ const Util = {
122
129
  },
123
130
 
124
131
  resolveTestIdWithRetry: (testInfo) => {
125
- const id = Util.shortTestId(testInfo.testId);
132
+ const id = Util.calculateId(testInfo.testId);
126
133
  const retry = testInfo.retry;
127
134
  if (retry > 0) {
128
135
  return `${id}-retry${retry}`;
@@ -266,13 +273,6 @@ const Util = {
266
273
  return '\n';
267
274
  },
268
275
 
269
- shortTestId: (id) => {
270
- if (id) {
271
- return id.split('-').pop();
272
- }
273
- return Util.uid();
274
- },
275
-
276
276
  getAttachmentPathExtras: function(d) {
277
277
  return {
278
278
  name: d.name,
package/lib/visitor.js CHANGED
@@ -176,7 +176,9 @@ class Visitor {
176
176
  }
177
177
 
178
178
  // suite uid for report
179
- const suiteId = suite._fileId || Util.uid();
179
+ const suiteStr = [suite._fileId].concat(suite.titlePath()).filter((it) => it).join(' ');
180
+ // console.log(suiteStr);
181
+ const suiteId = Util.calculateId(suiteStr);
180
182
 
181
183
  const group = {
182
184
  id: suiteId,
@@ -241,7 +243,7 @@ class Visitor {
241
243
  // const testIdExpression = `[project=${project._internal.id}]${test.titlePath().join('\x1e')}${repeatEachIndexSuffix}`;
242
244
  // const testId = fileId + '-' + calculateSha1(testIdExpression).slice(0, 20);
243
245
 
244
- const caseId = Util.shortTestId(testCase.id);
246
+ const caseId = Util.calculateId(testCase.id);
245
247
 
246
248
  const caseItem = {
247
249
  id: caseId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monocart-reporter",
3
- "version": "2.4.9",
3
+ "version": "2.5.1",
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": {
@@ -47,23 +47,24 @@
47
47
  "koa": "^2.15.3",
48
48
  "koa-static-resolver": "^1.0.6",
49
49
  "lz-utils": "^2.0.2",
50
- "monocart-coverage-reports": "^2.8.3",
50
+ "monocart-coverage-reports": "^2.8.5",
51
51
  "monocart-formatter": "^3.0.0",
52
52
  "monocart-locator": "^1.0.0",
53
- "nodemailer": "^6.9.13",
54
- "turbogrid": "^3.1.0"
53
+ "nodemailer": "^6.9.14",
54
+ "turbogrid": "^3.2.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@playwright/test": "^1.44.1",
58
58
  "axios": "^1.7.2",
59
59
  "dotenv": "^16.4.5",
60
- "eslint": "^9.4.0",
61
- "eslint-config-plus": "^2.0.1",
60
+ "eslint": "^9.5.0",
61
+ "eslint-config-plus": "^2.0.2",
62
62
  "eslint-plugin-html": "^8.1.1",
63
63
  "eslint-plugin-vue": "^9.26.0",
64
+ "mermaid": "^10.9.1",
64
65
  "open": "8.4.2",
65
66
  "stylelint": "^16.6.1",
66
67
  "stylelint-config-plus": "^1.1.2",
67
- "vine-ui": "^3.1.13"
68
+ "vine-ui": "^3.1.15"
68
69
  }
69
70
  }