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
I think tag list is just not specified in the spec as it should be.
I assume they are just sorting alphabetically which is a reasonable choice if the tag name is the primary key on the database.
However, I would prefer even better if tags were sorted by descending creation timestamp instead (or maybe updated time, and we can update updated time whenever the tag is applied to an article), as this will create a better user experience for people testing an implementation interactively. You create an article with a new tag, then go back to index, and then easily find your tag without Ctrl + F.
If we go with the timestamp route, I propose that the test should just sort the tags, as results won't be very deterministic when multiple tags are created more or less at the same time with the same post.
Another option would be to sort by most applied tags. This would also be helpful for autocomplete: #784
Indeed, we need to add rules about sorting in specs.
Meanwhile and to avoid breaking existing implementations, I'll create a PR to test tags regardless of their order.
I'm waiting for a review on #490 before (as there is a format change on the JSON file).
Relevant scope
Backend specs
Description
In post article body we have in the first place tag
training
:realworld/api/Conduit.postman_collection.json
Line 683 in a3855ae
But in tests we expected tag
dragons
in the first place:realworld/api/Conduit.postman_collection.json
Lines 1204 to 1205 in a3855ae
But why? If there is logic in this, it should be described somewhere in the docs. It seems to me that this is a bug.
The text was updated successfully, but these errors were encountered: