Add scene/image/gallery popover count buttons for performer/studio/tag cards (#1293)

* Add counts to graphql schema
* Add count resolvers and query refactor
* Add count popover buttons
This commit is contained in:
WithoutPants
2021-04-15 10:46:31 +10:00
committed by GitHub
parent e6aaa196f3
commit ea54a67798
27 changed files with 536 additions and 73 deletions

View File

@@ -95,6 +95,12 @@ func imageQueryQ(t *testing.T, sqb models.ImageReader, q string, expectedImageId
image := images[0]
assert.Equal(t, imageIDs[expectedImageIdx], image.ID)
count, err := sqb.QueryCount(nil, &filter)
if err != nil {
t.Errorf("Error querying image: %s", err.Error())
}
assert.Equal(t, len(images), count)
// no Q should return all results
filter.Q = nil
images, _, err = sqb.Query(nil, &filter)