-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Idea 💡A new feature ideaA new feature ideagood first picka reasonable task to start getting familiar with the code basea reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested
Description
Is your feature request related to a problem?
An addition to name Before and After hooks has been added in Cucumber v8.1.0.
Currently, these only are sent to Cucumber's formatter, which I've discussed as as not being used in WebDriverIO in issue #7692. Therefore, we will not see these messages in any WebDriverIO reporter output.
Describe the solution you'd like.
When a Cucumber Before/After hook has the name parameter provided, the WebDriverIO reporters should log the string of that parameter prior to the Cucumber hook being executed.
Describe alternatives you've considered.
I could just log the message within the function of the hook, changing it from
//Hook with name
Before({name: 'General setup'}, function(){
//...do some setup
});to
//Hook with log
Before(function(){
logger.info('General setup');
//...do some setup
});However, this is a little less clean when there is a lot going on in the function. Having the name parameter is much cleaner to read and is now the standard way of handling it in Cucumber v8.1.0.
Additional context
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Idea 💡A new feature ideaA new feature ideagood first picka reasonable task to start getting familiar with the code basea reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested