cucumber-reactive-reporter 1.0.8 → 1.0.10
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 +11 -18
- package/dist/cucumber-reactive-reporter.cjs.js +9 -3
- package/dist/cucumber-reactive-reporter.esm.js +9 -3
- package/dist/package.json +1 -1
- 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 +1 -1
package/README.md
CHANGED
|
@@ -5,8 +5,7 @@ Parses output of cucumberjs
|
|
|
5
5
|
provides filtering via tags ans status and few other things.</b>
|
|
6
6
|
<br>
|
|
7
7
|
### Why another reporter? ###
|
|
8
|
-
<b>The main motivation behind this project was the need to control various data attachments and how they
|
|
9
|
-
Existing libraries gave very sandboxy and limited options for things like attaching a custom html line to the report.
|
|
8
|
+
<b>The main motivation behind this project was the desire for a more dynamic experience as well as the need to get more control over various data attachments and how they are displayed.
|
|
10
9
|
|
|
11
10
|
Here are some of the things that were deemed important to implement in this reporter:
|
|
12
11
|
</b>
|
|
@@ -37,7 +36,12 @@ let metadata = {
|
|
|
37
36
|
"additional key": "value",
|
|
38
37
|
"more keys": "value"
|
|
39
38
|
};
|
|
39
|
+
let linkTags = [{
|
|
40
|
+
"pattern": "[a-zA-Z]*-(\\d)*$",
|
|
41
|
+
"link": "https://my.jira.server/browse/"
|
|
42
|
+
}];
|
|
40
43
|
options.metadata = metadata;
|
|
44
|
+
options.linkTags = linkTags;
|
|
41
45
|
(async () => {
|
|
42
46
|
await Reporter.generate("mytest/cucumber-output.json", "htmlOutputFolder/", options);
|
|
43
47
|
})();
|
|
@@ -52,22 +56,9 @@ options.metadata = metadata;
|
|
|
52
56
|
* ```(@catfacts or @image) and not @1_tag```
|
|
53
57
|
## TODOs and ideas for improvement:
|
|
54
58
|
|
|
55
|
-
1.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
issue: {
|
|
59
|
-
pattern: [/@issue=(.*)/],
|
|
60
|
-
urlTemplate: "http://localhost:8080/issue/%s"
|
|
61
|
-
},
|
|
62
|
-
tms: {
|
|
63
|
-
pattern: [/@tms=(.*)/],
|
|
64
|
-
urlTemplate: "http://localhost:8080/tms/%s"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
2. patch more settings for intial render (before/after toggle, theme, filter etc.)
|
|
69
|
-
3. handle state "ambiguous" (probably lump em with errors), generate one when there are two test definitions with similar regex
|
|
70
|
-
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)
|
|
71
62
|
|
|
72
63
|
### Release notes
|
|
73
64
|
|
|
@@ -80,3 +71,5 @@ links: {
|
|
|
80
71
|
| 1.0.6 | Added pagination to the main feature screen, shows up if above 50 |
|
|
81
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|
|
|
82
73
|
| 1.0.8 | Fixed json parsing error for newer cucumber version, where Before and After steps do not provide code line info|
|
|
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|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
4
|
|
|
5
5
|
var fs = _interopDefault(require('fs'));
|
|
6
|
+
require('fs/promises');
|
|
6
7
|
var ncp = _interopDefault(require('ncp'));
|
|
7
8
|
var path = _interopDefault(require('path'));
|
|
8
9
|
var ut = _interopDefault(require('util'));
|
|
@@ -58,14 +59,19 @@ const generate = async (source, dest, options) => {
|
|
|
58
59
|
options ? true : options = {};
|
|
59
60
|
const CUCUMBER_JSON_PATH = "_cucumber-results.json";
|
|
60
61
|
const SETTINGS_JSON_PATH = "_reporter_settings.json";
|
|
61
|
-
const HTML_PATH = path.join(path.dirname(modulePath), "react"); //
|
|
62
|
+
const HTML_PATH = path.join(path.dirname(modulePath), "react"); // "linkTags": [{
|
|
63
|
+
// "pattern": "[a-zA-Z]*-(\\d)*$",
|
|
64
|
+
// "link": "https://bydeluxe.atlassian.net/browse/"
|
|
65
|
+
// }]
|
|
66
|
+
//defaults
|
|
62
67
|
|
|
63
68
|
const {
|
|
64
69
|
title = "Cucumber Report",
|
|
65
70
|
//report page title
|
|
66
71
|
description = "Cucumber report",
|
|
67
72
|
//description to be set at the page header
|
|
68
|
-
metadata = {}
|
|
73
|
+
metadata = {},
|
|
74
|
+
linkTags = null
|
|
69
75
|
} = options;
|
|
70
76
|
|
|
71
77
|
let __dirname = path.resolve();
|
|
@@ -84,7 +90,7 @@ const generate = async (source, dest, options) => {
|
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
92
|
|
|
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
|
|
93
|
+
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
94
|
|
|
89
95
|
let str = fs.readFileSync(source).toString();
|
|
90
96
|
let obj = JSON.parse(str);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
+
import 'fs/promises';
|
|
2
3
|
import ncp from 'ncp';
|
|
3
4
|
import path from 'path';
|
|
4
5
|
import ut from 'util';
|
|
@@ -54,14 +55,19 @@ const generate = async (source, dest, options) => {
|
|
|
54
55
|
options ? true : options = {};
|
|
55
56
|
const CUCUMBER_JSON_PATH = "_cucumber-results.json";
|
|
56
57
|
const SETTINGS_JSON_PATH = "_reporter_settings.json";
|
|
57
|
-
const HTML_PATH = path.join(path.dirname(modulePath), "react"); //
|
|
58
|
+
const HTML_PATH = path.join(path.dirname(modulePath), "react"); // "linkTags": [{
|
|
59
|
+
// "pattern": "[a-zA-Z]*-(\\d)*$",
|
|
60
|
+
// "link": "https://bydeluxe.atlassian.net/browse/"
|
|
61
|
+
// }]
|
|
62
|
+
//defaults
|
|
58
63
|
|
|
59
64
|
const {
|
|
60
65
|
title = "Cucumber Report",
|
|
61
66
|
//report page title
|
|
62
67
|
description = "Cucumber report",
|
|
63
68
|
//description to be set at the page header
|
|
64
|
-
metadata = {}
|
|
69
|
+
metadata = {},
|
|
70
|
+
linkTags = null
|
|
65
71
|
} = options;
|
|
66
72
|
|
|
67
73
|
let __dirname = path.resolve();
|
|
@@ -80,7 +86,7 @@ const generate = async (source, dest, options) => {
|
|
|
80
86
|
}
|
|
81
87
|
}
|
|
82
88
|
|
|
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
|
|
89
|
+
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
90
|
|
|
85
91
|
let str = fs.readFileSync(source).toString();
|
|
86
92
|
let obj = JSON.parse(str);
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cucumber-reactive-reporter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
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",
|
|
@@ -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
|
{
|