-
Notifications
You must be signed in to change notification settings - Fork 99
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
flexible step names - @As annotation access to class fields #386
Comments
Interesting suggestion and also quite useful I think. There is already a possibility to inject the current step by using the |
Done. You can now do the following:
|
When do you plan to release a new version? |
Is released in version 0.18.0 |
I can't see the Name property anywhere in HTML report, just on JSON report. Maybe HTML report is not reflecting the change? |
Yes, indeed, you are right. But it is not the HTML report that is wrong, the JSON is actually wrong. The problem is that only the name of the step is changed, but not the words array. |
I think I have not really thought this feature to the end. While updating the words array would be possible, the argument information would get lost. In parametrized scenarios this would mean that when the step name changes, JGiven will not be able to create data tables. |
I fixed this and updated the documentation to make clear that data tables cannot be created. Otherwise this should work now with the next 0.18.2 release. |
I have a scenario:
Is it possible to have in the report a dynamic step name that will include values from the stage (and not only method arguments)?
I.e.: something like this:
Or somehow extend the AsProvider class to have access to ExpectedScenarioState fields? Maybe Other option can be adding a new method setStepName(String name) and call from method to adjust it's name in the report.
Now the workaround that I use in my code is like this ( this is ugly but works):
Best regards and thanks for help
The text was updated successfully, but these errors were encountered: