Skip to content

Commit 19e1558

Browse files
author
Marc Rooding
committed
Moved stuff around
1 parent a3d035e commit 19e1558

File tree

1 file changed

+19
-32
lines changed

1 file changed

+19
-32
lines changed

README.md

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,23 @@ var reporter = require('gulp-protractor-cucumber-html-report');
2121

2222
## The "protractor-cucumber-html-report" task
2323

24-
### Overview
24+
### Options
25+
26+
#### options.dest
27+
Type: `String`
28+
Default value: `'.'`
29+
30+
The output directory for the HTML report relative from the Gulpfile
31+
32+
#### options.filename
33+
Type: `String`
34+
Default value: `'report.html'`
35+
36+
The filename for the HTML report
37+
38+
### Usage Examples
39+
40+
#### Overview
2541
In your project's Gulpfile, you can use the reporter in your pipeline as follows:
2642

2743
```js
@@ -31,7 +47,7 @@ gulp.src('./cucumber-test-results.json')
3147
}));
3248
```
3349

34-
### Saving CucumberJS json to disk when using Protractor
50+
#### Saving CucumberJS json to disk when using Protractor
3551
If you're using Protractor in combination with CucumberJS there currently is [no way](https://github.com/cucumber/cucumber-js/issues/90) to save the CucumberJS JSON output to a file.
3652

3753
It is however possible to add a listener to the CucumberJS JSON formatter and save it to a file manually. The following hook can be added to your project and included to your Protractor configuration.
@@ -56,7 +72,7 @@ module.exports = function JsonOutputHook() {
5672

5773
Above snippet will hook into the CucumberJS JSON formatter and save the JSON to a file called 'cucumber-test-results.json' in the './reports' folder (relative from this file's location)
5874

59-
### Setting up Protractor, CucumberJS and the JSON listener
75+
#### Setting up Protractor, CucumberJS and the JSON listener
6076

6177
In your protractor.conf.js add a reference to the hook listener (as shown above). In this example the file is found in './support'. Also make sure to set the output format to 'json'.
6278

@@ -66,35 +82,6 @@ cucumberOpts: {
6682
format: 'json'
6783
},
6884
```
69-
### Options
70-
71-
#### options.dest
72-
Type: `String`
73-
Default value: `'.'`
74-
75-
The output directory for the HTML report relative from the Gulpfile
76-
77-
#### options.filename
78-
Type: `String`
79-
Default value: `'report.html'`
80-
81-
The filename for the HTML report
82-
83-
### Usage Examples
84-
85-
#### Default Options
86-
87-
```js
88-
grunt.initConfig({
89-
'protractor-cucumber-html-report': {
90-
options: {
91-
dest: '.',
92-
output: 'report.html',
93-
testJSONResultPath: '',
94-
},
95-
},
96-
});
97-
```
9885

9986
## Contributing
10087
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

0 commit comments

Comments
 (0)