-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: event setup for nightwatch hooks #3706
Feat: event setup for nightwatch hooks #3706
Conversation
f99ac04
to
cc27a54
Compare
Feat/cucumber report
is it possible to give out instance of event emitter to plugins and globals? In this approach we are iterating over plugins for each event emission which I don't think is optimally correct. Also why can't we emit specific events instead of emitting one global event and running all the functions on each plugin. Example: onEvent(eventBroadcaster) {
eventBroadcaster.on('TestRunStarted', () => consol.log('test run started'))
// ....
} |
@gravityvi It possible to pass in the event emitter. I came up with this approach because the api looked a bit strange to me ( setEventHandlers(eventBroadcaster) {
eventBroadcaster.on('TestRunStarted', () => consol.log('test run started'))
// ....
} @beatfactor What are your thoughts? How should the API look? |
Status
|
bug fix: require cucumber only when needed
(cherry picked from commit a787b37b37307d8e30ce2539721697c611235bb8)
…ightwatch into feat/TO-integration
* session capabilities fix for parallel in cucumber (cherry picked from commit a787b37b37307d8e30ce2539721697c611235bb8) * code refactoring
(cherry picked from commit 9842ff7)
(cherry picked from commit be6a6ec)
(cherry picked from commit 323c3940b9a57a6c750bc1ffc168de1cca711c1a)
…it-bs/nightwatch into feat/TO-integration
f0c452b
to
0b1f4b5
Compare
Supported Events
Default Nightwatch Runner Events
Cucumber Runner Events
Common Events
Subscribing to Events
In order to subscribe to the events, the user has the option to define an
registerEventHandlers
function within the globals of either NightwatchJS or plugins.Here's how you could define an
registerEventHandlers
function to handle these events: