-
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
HTML5 Report: Introduce ordering of scenarios #79
Comments
Yes. That is a very good point. I already thought about that issue and didn't come up with a good solution yet, so I would be very happy about suggestions. I would like to avoid additional annotations if possible. |
Issue #71 is somehow related to this one. |
I agree that this feature is not trivial. Main issue is that a scenario can be related to many tags and its position may depends on the selected tag. We would need an order by tag, indeed an order for each tag combination! I confess that I do not have the solution. Maybe can we find inspiration from others similar tools? |
I finished a first implementation for grouping, sorting, and filtering. It is tracked now by PR #81. If you want to test it on your project you can use v0.8.0-SNAPSHOT. You have to add the following snapshot repository to Maven/Gradle in order to get the SNAPSHOT version: https://oss.sonatype.org/content/repositories/snapshots Alternatively you can just checkout the
|
Thanks. |
So do you think that this is enough for your use case? What I could add in addition would an option to sort by a tag. Then you could put tag-annotations on scenarios to define a certain order. |
This is a great improvement for the issue #80 use case. But it's not enough for the ordering one. Anyway, I don't think there is a trivial solution. One has to found a solution managing multi-tags combination. Over a first phase, I'll see if the grouping capabilities are enough to deal with our scenarios. Thanks for your great job ;) |
Ok. So I think a first easy solution would be to allow ordering by tags with values. For example, if you have a tag This, however, only works if the value itself can be used for sorting. This should be true for most cases that I can think of. In addition, it would allow you to define an annotation |
That could be a first solution. |
Ok :-) |
I have implemented the sorting by tag. Its available with v0.8.0-SNAPSHOT. You can try it also out at http://jgiven.org/snapshot/jgiven-report/html5/#/all and 'Sort By -> Issue'. |
Do you think I can close the issue? |
I would keep it open as we only have a partial solution. ;) By the way, the sort by tag option could probably be improved. But these tags are displayed anyway and they are like boilerplate around my scenarios. |
Actually you can do that already by using the
in a
|
Ok. That's nice! |
We may have quite a few scenarios for a given tag.
Currently, they are sorted using alphabetical ordering.
It could be useful to think about a mechanism allowing us to control the ordering used by report generation. The simplest solution probably is to annotate each scenario with its order but we could also think about other strategies.
The text was updated successfully, but these errors were encountered: