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
This looks like it exactly replicates what was there before, so this isn't a request for a change. Maybe something for another ticket.
It looks like each of these tests loads six images, requests one of them, and expects to see the remaining five in the visuallySimilar/withSimilarFeatures/withSimilarColors list.
This is fine as a positive test, showing that the lists exist and are populated on request, but does not demonstrate any discrimination - it does not exclude any dissimilar images.
All of them would pass if the API simply returned all the images in the database in whichever list was requested in the query string (or something more subtle).
Perhaps the tests could be crafted so that the same input data is used for all three, grouped thus:
features a colours x
features a colours y
features b colours y
Then visually similar could return group 1, similar features groups 1 and 2, similar colours groups 2 and 3.
Related: Add tests for combinations of includes. It doesn't have to demonstrate every permutation, just show that if I ask for e.g. withSimilarFeatures,withSimilarColors, then both lists are returned. That's the kind of thing where if x ... if y ... can accidentally become if x ... else if y ...
Originally posted by @paul-butcher in #430 (review)
The text was updated successfully, but these errors were encountered: