You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've been using this plugin for a little while now and found it vastly superior to both earlier plugins for jbehave on intellij and also eclipse.
However I was wondering firstly whether the following improvement is technically possible and if so the secondly whether it would be implemented?
We generally write a steps in the following way:
@when("Toolbar bold button is clicked") @then("Toolbar bold button is enabled") @then("Toolbar bold button is visible")
However for a toolbar that has say 30 buttons on it this means replicating these three steps 30 times over which results in 90 steps. This is not great for code duplication.
So we currently use the approach of:
@when("Toolbar $buttonname button is clicked") @then("Toolbar $buttonname button is enabled") @then("Toolbar $buttonname button is visible")
and then use a map (if we're passing button name as a string) or an switch statement (if we are passing an enum) in a page object method to carry out a common method on whichever button locator has been specified.
However this makes story writing somewhat harder as when those steps are used the author of the story needs to know what string or enum value to set and thus usually has to inspect the code to find what they need.
What would be ideal would be the ability to provide in the plugin during step completion a list of parameter options (e..g. Bold, Italic, Underline) that a story author can select for this step.
Is this feasible? Would it require changes to JBehave itself or merely the plugin if so?
many thanks
Ben
The text was updated successfully, but these errors were encountered:
Hi
We've been using this plugin for a little while now and found it vastly superior to both earlier plugins for jbehave on intellij and also eclipse.
However I was wondering firstly whether the following improvement is technically possible and if so the secondly whether it would be implemented?
We generally write a steps in the following way:
@when("Toolbar bold button is clicked")
@then("Toolbar bold button is enabled")
@then("Toolbar bold button is visible")
However for a toolbar that has say 30 buttons on it this means replicating these three steps 30 times over which results in 90 steps. This is not great for code duplication.
So we currently use the approach of:
@when("Toolbar $buttonname button is clicked")
@then("Toolbar $buttonname button is enabled")
@then("Toolbar $buttonname button is visible")
and then use a map (if we're passing button name as a string) or an switch statement (if we are passing an enum) in a page object method to carry out a common method on whichever button locator has been specified.
However this makes story writing somewhat harder as when those steps are used the author of the story needs to know what string or enum value to set and thus usually has to inspect the code to find what they need.
What would be ideal would be the ability to provide in the plugin during step completion a list of parameter options (e..g. Bold, Italic, Underline) that a story author can select for this step.
Is this feasible? Would it require changes to JBehave itself or merely the plugin if so?
many thanks
Ben
The text was updated successfully, but these errors were encountered: