-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reporter is now EventEmitter; You can also defined custom reporters; …
…Dropped progress bars
- Loading branch information
1 parent
9fad8ab
commit 3b2881d
Showing
30 changed files
with
514 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ example/ | |
lib/ | ||
node_modules/ | ||
report/ | ||
docs/ | ||
html-docs/ | ||
.dockerignore | ||
.gitignore | ||
Dockerfile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/lib/ | ||
/coverage/ | ||
/report/ | ||
/html-docs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
/qape.conf.js | ||
/example/ | ||
/src/ | ||
/html-docs/ | ||
/.dockerignore | ||
/Dockerfile | ||
/.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Reporters | ||
You can define reporters via config.reporters. | ||
|
||
``` | ||
var LocalCool = require('/path/to/LocalCool'); | ||
export default { | ||
reporters: [ | ||
// For reporter published in npm registry as 'qape-reporter-cool' | ||
'cool', | ||
// LocalCool is Class extending EventEmitter | ||
LocalCool | ||
] | ||
} | ||
``` | ||
|
||
## Example | ||
```javascript | ||
import EventEmitter from 'events'; | ||
|
||
export default class DefaultReporter extends EventEmitter { | ||
constructor(config) { | ||
super(); | ||
|
||
// You will recieve configuration for current QApe run | ||
this._config = config; | ||
|
||
// runner:start is emitted after browser instance is initialized | ||
// eventData contains scenario and browser instance | ||
this.on('runner:start', eventData => console.log(eventData)); | ||
// scenarios:start is emitted after specific scenario starts | ||
// eventData contains browser instance, scenario type | ||
// For type 'defined' there is also scenario and name | ||
// For type 'failing' there is also scenario and errors | ||
this.on('scenario:start', eventData => console.log(eventData)); | ||
// scenarios:end is emitted after specific scenario is finished | ||
// eventData contains browser instance, scenario type | ||
// For type 'defined' there is also scenario, name and results | ||
// For type 'failing' there is also scenario, errors and minified (boolean) | ||
// For type 'random' there is also results | ||
this.on('scenario:end', eventData => console.log(eventData)); | ||
// runner:end is emitted after browser instance is cleared | ||
this.on('runner:end', () => console.log('it\'s done')); | ||
// runner:error is emitted whenever an uncaught error occurred | ||
// eventData contains scenario, and browser instance and error | ||
this.on('runner:error', eventData => console.log(eventData)); | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
"main": "index.js", | ||
"scripts": { | ||
"test": "jest", | ||
"docs:build": "documentation build src/** -f html -o html-docs", | ||
"build": "rm -rf lib && babel src --out-dir lib --ignore \"src/**/*Spec.js\" --copy-files --plugins=transform-es2015-modules-commonjs", | ||
"dev": "npm run build -- --source-maps --watch", | ||
"start": "node -r source-map-support/register bin/qape.js", | ||
|
@@ -20,21 +21,21 @@ | |
"monkey" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/seznam/qape.git" | ||
}, | ||
"type": "git", | ||
"url": "https://github.com/seznam/qape.git" | ||
}, | ||
"author": "Filip Satek <[email protected]>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"commander": "2.17.1", | ||
"glob-all": "3.1.0", | ||
"lodash": "4.17.10", | ||
"progress": "2.0.0", | ||
"lodash.isequal": "4.5.0", | ||
"puppeteer": "1.8.0" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "6.26.0", | ||
"babel-plugin-transform-es2015-modules-commonjs": "6.26.2", | ||
"documentation": "8.1.2", | ||
"express": "4.16.3", | ||
"jest": "23.6.0", | ||
"serve-static": "1.13.2", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.