cucumber-reactive-reporter 1.0.9 → 1.0.11
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 +9 -16
- package/dist/cucumber-reactive-reporter.cjs.js +8 -3
- package/dist/cucumber-reactive-reporter.esm.js +8 -3
- package/dist/package.json +14 -3
- package/dist/react/precache-manifest.js +5 -5
- package/dist/react/static/js/2.js +1 -1
- package/dist/react/static/js/main.js +1 -1
- package/package.json +14 -3
- package/dist/react/cucumber-results.json +0 -2775
package/README.md
CHANGED
|
@@ -36,7 +36,12 @@ let metadata = {
|
|
|
36
36
|
"additional key": "value",
|
|
37
37
|
"more keys": "value"
|
|
38
38
|
};
|
|
39
|
+
let linkTags = [{
|
|
40
|
+
"pattern": "[a-zA-Z]*-(\\d)*$",
|
|
41
|
+
"link": "https://my.jira.server/browse/"
|
|
42
|
+
}];
|
|
39
43
|
options.metadata = metadata;
|
|
44
|
+
options.linkTags = linkTags;
|
|
40
45
|
(async () => {
|
|
41
46
|
await Reporter.generate("mytest/cucumber-output.json", "htmlOutputFolder/", options);
|
|
42
47
|
})();
|
|
@@ -51,22 +56,9 @@ options.metadata = metadata;
|
|
|
51
56
|
* ```(@catfacts or @image) and not @1_tag```
|
|
52
57
|
## TODOs and ideas for improvement:
|
|
53
58
|
|
|
54
|
-
1.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
issue: {
|
|
58
|
-
pattern: [/@issue=(.*)/],
|
|
59
|
-
urlTemplate: "http://localhost:8080/issue/%s"
|
|
60
|
-
},
|
|
61
|
-
tms: {
|
|
62
|
-
pattern: [/@tms=(.*)/],
|
|
63
|
-
urlTemplate: "http://localhost:8080/tms/%s"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
2. patch more settings for intial render (before/after toggle, theme, filter etc.)
|
|
68
|
-
3. handle state "ambiguous" (probably lump em with errors), generate one when there are two test definitions with similar regex
|
|
69
|
-
4. Figure out a strategy for handling combined reports (from parallel runs)
|
|
59
|
+
1. patch more settings for intial render (before/after toggle, theme, filter etc.)
|
|
60
|
+
2. handle state "ambiguous" (probably lump em with errors), generate one when there are two test definitions with similar regex
|
|
61
|
+
3. Figure out a strategy for handling combined reports (from parallel runs)
|
|
70
62
|
|
|
71
63
|
### Release notes
|
|
72
64
|
|
|
@@ -80,3 +72,4 @@ links: {
|
|
|
80
72
|
| 1.0.7 | Changed feature pagination to be always on if above 10 elements, the reason why is you can change to display 10 at a time to force single column|
|
|
81
73
|
| 1.0.8 | Fixed json parsing error for newer cucumber version, where Before and After steps do not provide code line info|
|
|
82
74
|
| 1.0.9 | Fixed displayed step duration in newer versions of cucumber|
|
|
75
|
+
| 1.0.10 | New reporter option to convert some tags to custom links|
|
|
@@ -58,14 +58,19 @@ const generate = async (source, dest, options) => {
|
|
|
58
58
|
options ? true : options = {};
|
|
59
59
|
const CUCUMBER_JSON_PATH = "_cucumber-results.json";
|
|
60
60
|
const SETTINGS_JSON_PATH = "_reporter_settings.json";
|
|
61
|
-
const HTML_PATH = path.join(path.dirname(modulePath), "react"); //
|
|
61
|
+
const HTML_PATH = path.join(path.dirname(modulePath), "react"); // "linkTags": [{
|
|
62
|
+
// "pattern": "[a-zA-Z]*-(\\d)*$",
|
|
63
|
+
// "link": "https://bydeluxe.atlassian.net/browse/"
|
|
64
|
+
// }]
|
|
65
|
+
//defaults
|
|
62
66
|
|
|
63
67
|
const {
|
|
64
68
|
title = "Cucumber Report",
|
|
65
69
|
//report page title
|
|
66
70
|
description = "Cucumber report",
|
|
67
71
|
//description to be set at the page header
|
|
68
|
-
metadata = {}
|
|
72
|
+
metadata = {},
|
|
73
|
+
linkTags = null
|
|
69
74
|
} = options;
|
|
70
75
|
|
|
71
76
|
let __dirname = path.resolve();
|
|
@@ -84,7 +89,7 @@ const generate = async (source, dest, options) => {
|
|
|
84
89
|
}
|
|
85
90
|
}
|
|
86
91
|
|
|
87
|
-
console.log(`__dirname: ${__dirname}\n` + `html path: ${HTML_PATH}\n` + `source: ${source}\n` + `destination: ${dest}\n` + `title: ${title}\n` + `description: ${description}\n` + `metadata: ${ut.inspect(metadata, false, null)}\n`); //validate input json and make a copy
|
|
92
|
+
console.log(`__dirname: ${__dirname}\n` + `html path: ${HTML_PATH}\n` + `source: ${source}\n` + `destination: ${dest}\n` + `title: ${title}\n` + `description: ${description}\n` + `metadata: ${ut.inspect(metadata, false, null)}\n` + `linkTags: ${ut.inspect(linkTags, false, null)}\n`); //validate input json and make a copy
|
|
88
93
|
|
|
89
94
|
let str = fs.readFileSync(source).toString();
|
|
90
95
|
let obj = JSON.parse(str);
|
|
@@ -54,14 +54,19 @@ const generate = async (source, dest, options) => {
|
|
|
54
54
|
options ? true : options = {};
|
|
55
55
|
const CUCUMBER_JSON_PATH = "_cucumber-results.json";
|
|
56
56
|
const SETTINGS_JSON_PATH = "_reporter_settings.json";
|
|
57
|
-
const HTML_PATH = path.join(path.dirname(modulePath), "react"); //
|
|
57
|
+
const HTML_PATH = path.join(path.dirname(modulePath), "react"); // "linkTags": [{
|
|
58
|
+
// "pattern": "[a-zA-Z]*-(\\d)*$",
|
|
59
|
+
// "link": "https://bydeluxe.atlassian.net/browse/"
|
|
60
|
+
// }]
|
|
61
|
+
//defaults
|
|
58
62
|
|
|
59
63
|
const {
|
|
60
64
|
title = "Cucumber Report",
|
|
61
65
|
//report page title
|
|
62
66
|
description = "Cucumber report",
|
|
63
67
|
//description to be set at the page header
|
|
64
|
-
metadata = {}
|
|
68
|
+
metadata = {},
|
|
69
|
+
linkTags = null
|
|
65
70
|
} = options;
|
|
66
71
|
|
|
67
72
|
let __dirname = path.resolve();
|
|
@@ -80,7 +85,7 @@ const generate = async (source, dest, options) => {
|
|
|
80
85
|
}
|
|
81
86
|
}
|
|
82
87
|
|
|
83
|
-
console.log(`__dirname: ${__dirname}\n` + `html path: ${HTML_PATH}\n` + `source: ${source}\n` + `destination: ${dest}\n` + `title: ${title}\n` + `description: ${description}\n` + `metadata: ${ut.inspect(metadata, false, null)}\n`); //validate input json and make a copy
|
|
88
|
+
console.log(`__dirname: ${__dirname}\n` + `html path: ${HTML_PATH}\n` + `source: ${source}\n` + `destination: ${dest}\n` + `title: ${title}\n` + `description: ${description}\n` + `metadata: ${ut.inspect(metadata, false, null)}\n` + `linkTags: ${ut.inspect(linkTags, false, null)}\n`); //validate input json and make a copy
|
|
84
89
|
|
|
85
90
|
let str = fs.readFileSync(source).toString();
|
|
86
91
|
let obj = JSON.parse(str);
|
package/dist/package.json
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cucumber-reactive-reporter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "A filterable html report generator for cucumberjs written in react",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/unsuspecting-noob/cucumber-reactive-reporter",
|
|
7
7
|
"main": "dist/cucumber-reactive-reporter.cjs.js",
|
|
8
8
|
"module": "dist/cucumber-reactive-reporter.esm.js",
|
|
9
|
-
"files": [
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/*.js",
|
|
11
|
+
"dist/react/**/*",
|
|
12
|
+
"dist/package.json"
|
|
13
|
+
],
|
|
10
14
|
"repository": "github.com:unsuspecting-noob/cucumber-reactive-reporter.git",
|
|
11
|
-
"keywords": [
|
|
15
|
+
"keywords": [
|
|
16
|
+
"cucumber",
|
|
17
|
+
"cucumberjs",
|
|
18
|
+
"html",
|
|
19
|
+
"report",
|
|
20
|
+
"reporter"
|
|
21
|
+
],
|
|
12
22
|
"license": "MIT",
|
|
13
23
|
"scripts": {
|
|
14
24
|
"start": "PUBLIC_URL=./ react-scripts start",
|
|
@@ -28,6 +38,7 @@
|
|
|
28
38
|
"@babel/cli": "^7.8.4",
|
|
29
39
|
"@babel/core": "^7.8.4",
|
|
30
40
|
"@babel/preset-env": "^7.8.4",
|
|
41
|
+
"fs-promise": "^2.0.3",
|
|
31
42
|
"ncp": "^2.0.0",
|
|
32
43
|
"rollup": "^1.0.0",
|
|
33
44
|
"rollup-plugin-babel": "^4.2.0",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
self.__precacheManifest = (self.__precacheManifest || []).concat([
|
|
2
2
|
{
|
|
3
|
-
"revision": "
|
|
3
|
+
"revision": "2cf4b2fae6824e4886d08e06bec0fec5",
|
|
4
4
|
"url": "./index.html"
|
|
5
5
|
},
|
|
6
6
|
{
|
|
7
|
-
"revision": "
|
|
7
|
+
"revision": "c918967a5be3093b1dd9",
|
|
8
8
|
"url": "./static/css/2.css"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
|
-
"revision": "
|
|
11
|
+
"revision": "3bfaa216c0baff752102",
|
|
12
12
|
"url": "./static/css/main.css"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
"revision": "
|
|
15
|
+
"revision": "c918967a5be3093b1dd9",
|
|
16
16
|
"url": "./static/js/2.js"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
@@ -20,7 +20,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
|
|
20
20
|
"url": "./static/js/2.js.LICENSE.txt"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
"revision": "
|
|
23
|
+
"revision": "3bfaa216c0baff752102",
|
|
24
24
|
"url": "./static/js/main.js"
|
|
25
25
|
},
|
|
26
26
|
{
|